MCPcopy Index your code
hub / github.com/Effect-TS/effect / interruptibleMask

Function interruptibleMask

packages/effect/src/internal/core.ts:1010–1021  ·  view source on GitHub ↗
(
  f: (restore: <AX, EX, RX>(effect: Effect.Effect<AX, EX, RX>) => Effect.Effect<AX, EX, RX>) => Effect.Effect<A, E, R>
)

Source from the content-addressed store, hash-verified

1008
1009/* @internal */
1010export 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 */
1024export const intoDeferred: {

Callers

nothing calls this directly

Calls 1

customFunction · 0.70

Tested by

no test coverage detected