MCPcopy Index your code
hub / github.com/Effect-TS/effect / collectExits

Function collectExits

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

Source from the content-addressed store, hash-verified

2224 const joinOrder = new Array<FiberRuntime<Exit.Exit<X, E> | Effect.Blocked<X, E>>>()
2225 const residual = new Array<core.Blocked>()
2226 const collectExits = () => {
2227 const exits: Array<Exit.Exit<any, E>> = results
2228 .filter(({ exit }) => exit._tag === "Failure")
2229 .sort((a, b) => a.index < b.index ? -1 : a.index === b.index ? 0 : 1)
2230 .map(({ exit }) => exit)
2231 if (exits.length === 0) {
2232 exits.push(core.exitVoid)
2233 }
2234 return exits
2235 }
2236 const runFiber = <A, E, R>(eff: Effect.Effect<A, E, R>, interruptImmediately = false) => {
2237 const runnable = core.uninterruptible(graft(eff))
2238 const fiber = unsafeForkUnstarted(

Callers 1

nextFunction · 0.85

Calls 1

mapMethod · 0.65

Tested by

no test coverage detected