MCPcopy
hub / github.com/Effect-TS/effect / uninterruptibleMask

Function uninterruptibleMask

packages/effect/src/Micro.ts:3698–3708  ·  view source on GitHub ↗
(
  f: (
    restore: <A, E, R>(effect: Micro<A, E, R>) => Micro<A, E, R>
  ) => Micro<A, E, R>
)

Source from the content-addressed store, hash-verified

3696 * @category interruption
3697 */
3698export const uninterruptibleMask = <A, E, R>(
3699 f: (
3700 restore: <A, E, R>(effect: Micro<A, E, R>) => Micro<A, E, R>
3701 ) => Micro<A, E, R>
3702): Micro<A, E, R> =>
3703 withMicroFiber((fiber) => {
3704 if (!fiber.interruptible) return f(identity)
3705 fiber.interruptible = false
3706 fiber._stack.push(setInterruptible(true))
3707 return f(interruptible)
3708 })
3709
3710// ========================================================================
3711// collecting & elements

Callers 2

Micro.tsFile · 0.70
acquireUseReleaseFunction · 0.70

Calls 1

fFunction · 0.70

Tested by

no test coverage detected