| 1008 | |
| 1009 | /* @internal */ |
| 1010 | export const interruptibleMask = <A, E, R>( |
| 1011 | f: (restore: <AX, EX, RX>(effect: Effect.Effect<AX, EX, RX>) => Effect.Effect<AX, EX, RX>) => Effect.Effect<A, E, R> |
| 1012 | ): Effect.Effect<A, E, R> => |
| 1013 | custom(f, function() { |
| 1014 | const effect = new EffectPrimitive(OpCodes.OP_UPDATE_RUNTIME_FLAGS) as any |
| 1015 | effect.effect_instruction_i0 = RuntimeFlagsPatch.enable(runtimeFlags_.Interruption) |
| 1016 | effect.effect_instruction_i1 = (oldFlags: RuntimeFlags.RuntimeFlags) => |
| 1017 | runtimeFlags_.interruption(oldFlags) |
| 1018 | ? internalCall(() => this.effect_instruction_i0(interruptible)) |
| 1019 | : internalCall(() => this.effect_instruction_i0(uninterruptible)) |
| 1020 | return effect |
| 1021 | }) |
| 1022 | |
| 1023 | /* @internal */ |
| 1024 | export const intoDeferred: { |