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

Function interruptible

packages/effect/src/Micro.ts:3666–3675  ·  view source on GitHub ↗
(
  self: Micro<A, E, R>
)

Source from the content-addressed store, hash-verified

3664 * @category flags
3665 */
3666export const interruptible = <A, E, R>(
3667 self: Micro<A, E, R>
3668): Micro<A, E, R> =>
3669 withMicroFiber((fiber) => {
3670 if (fiber.interruptible) return self
3671 fiber.interruptible = true
3672 fiber._stack.push(setInterruptible(false))
3673 if (fiber._interrupted) return exitInterrupt
3674 return self
3675 })
3676
3677/**
3678 * Wrap the given `Micro` effect in an uninterruptible region, preventing the

Callers 3

raceAllFunction · 0.70
raceAllFirstFunction · 0.70
Micro.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected