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

Function onExit

packages/effect/src/Channel.ts:2347–2351  ·  view source on GitHub ↗
(exit: Exit.Exit<OutElem2, EX>)

Source from the content-addressed store, hash-verified

2345
2346 let errorCause: Cause.Cause<EX> | undefined
2347 const onExit = (exit: Exit.Exit<OutElem2, EX>) => {
2348 if (exit._tag === "Success") return
2349 errorCause = exit.cause
2350 Queue.failCauseUnsafe(queue, exit.cause)
2351 }
2352 yield* pull.pipe(
2353 Effect.flatMap((value) => {
2354 if (errorCause) return Effect.failCause(errorCause)

Callers 7

defaultTeardownFunction · 0.70
Effect.tsFile · 0.70
Sink.tsFile · 0.70
makePullFunction · 0.70
runSideFunction · 0.70
Channel.tsFile · 0.70
Stream.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected