| 1338 | |
| 1339 | /* @internal */ |
| 1340 | export const uninterruptibleMask = <A, E, R>( |
| 1341 | f: (restore: <AX, EX, RX>(effect: Effect.Effect<AX, EX, RX>) => Effect.Effect<AX, EX, RX>) => Effect.Effect<A, E, R> |
| 1342 | ): Effect.Effect<A, E, R> => |
| 1343 | custom(f, function() { |
| 1344 | const effect = new EffectPrimitive(OpCodes.OP_UPDATE_RUNTIME_FLAGS) as any |
| 1345 | effect.effect_instruction_i0 = RuntimeFlagsPatch.disable(runtimeFlags_.Interruption) |
| 1346 | effect.effect_instruction_i1 = (oldFlags: RuntimeFlags.RuntimeFlags) => |
| 1347 | runtimeFlags_.interruption(oldFlags) |
| 1348 | ? internalCall(() => this.effect_instruction_i0(interruptible)) |
| 1349 | : internalCall(() => this.effect_instruction_i0(uninterruptible)) |
| 1350 | return effect |
| 1351 | }) |
| 1352 | |
| 1353 | const void_: Effect.Effect<void> = succeed(void 0) |
| 1354 | export { |