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

Function interruptAll

packages/effect/src/internal/fiberRuntime.ts:2223–2232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2221 const fibers = new Set<FiberRuntime<Exit.Exit<X, E> | Effect.Blocked<X, E>>>()
2222 const results = new Array()
2223 const interruptAll = () =>
2224 fibers.forEach((fiber) => {
2225 fiber.currentScheduler.scheduleTask(
2226 () => {
2227 fiber.unsafeInterruptAsFork(parent.id())
2228 },
2229 0,
2230 fiber
2231 )
2232 })
2233 const startOrder = new Array<FiberRuntime<Exit.Exit<X, E> | Effect.Blocked<X, E>>>()
2234 const joinOrder = new Array<FiberRuntime<Exit.Exit<X, E> | Effect.Blocked<X, E>>>()
2235 const residual = new Array<core.Blocked>()

Callers 2

onInterruptSignalFunction · 0.70
raceAllFunction · 0.70

Calls 3

scheduleTaskMethod · 0.65
unsafeInterruptAsForkMethod · 0.65
idMethod · 0.65

Tested by

no test coverage detected