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

Function uninterruptibleMask

packages/effect/src/Micro.ts:3699–3709  ·  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

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

Callers 2

Micro.tsFile · 0.70
acquireUseReleaseFunction · 0.70

Calls 1

fFunction · 0.70

Tested by

no test coverage detected