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

Function onExit

packages/effect/src/Micro.ts:1421–1432  ·  view source on GitHub ↗
(exit: MicroExit<any, any>)

Source from the content-addressed store, hash-verified

1419 const fibers = new Set<MicroFiber<any, any>>()
1420 const causes: Array<MicroCause<any>> = []
1421 const onExit = (exit: MicroExit<any, any>) => {
1422 doneCount++
1423 if (exit._tag === "Failure") {
1424 causes.push(exit.cause)
1425 if (doneCount >= len) {
1426 resume(failCause(causes[0]))
1427 }
1428 return
1429 }
1430 done = true
1431 resume(fibers.size === 0 ? exit : flatMap(uninterruptible(fiberInterruptAll(fibers)), () => exit))
1432 }
1433
1434 for (let i = 0; i < len; i++) {
1435 if (done) break

Callers 6

raceAllFunction · 0.70
raceAllFirstFunction · 0.70
Micro.tsFile · 0.70
scopedFunction · 0.70
core.tsFile · 0.50
runMethod · 0.50

Calls 4

fiberInterruptAllFunction · 0.85
resumeFunction · 0.70
uninterruptibleFunction · 0.70
failCauseFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…