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

Function interruptible

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

Source from the content-addressed store, hash-verified

3663 * @category flags
3664 */
3665export const interruptible = <A, E, R>(
3666 self: Micro<A, E, R>
3667): Micro<A, E, R> =>
3668 withMicroFiber((fiber) => {
3669 if (fiber.interruptible) return self
3670 fiber.interruptible = true
3671 fiber._stack.push(setInterruptible(false))
3672 if (fiber._interrupted) return exitInterrupt
3673 return self
3674 })
3675
3676/**
3677 * 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…