MCPcopy Create free account
hub / github.com/Effect-TS/effect / uninterruptibleMask

Function uninterruptibleMask

packages/effect/src/internal/core.ts:1340–1351  ·  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

1338
1339/* @internal */
1340export 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
1353const void_: Effect.Effect<void> = succeed(void 0)
1354export {

Callers 1

core.tsFile · 0.70

Calls 1

customFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…