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

Function handler

packages/effect/src/internal/stream.ts:4307–4312  ·  view source on GitHub ↗
(terminate: boolean)

Source from the content-addressed store, hash-verified

4305 const strategy = options.haltStrategy ? haltStrategy.fromInput(options.haltStrategy) : HaltStrategy.Both
4306 const handler =
4307 (terminate: boolean) =>
4308 (exit: Exit.Exit<unknown, E | E2>): MergeDecision.MergeDecision<R | R2, E | E2, unknown, E | E2, unknown> =>
4309 terminate || !Exit.isSuccess(exit) ?
4310 // TODO: remove
4311 MergeDecision.Done(Effect.suspend(() => exit)) :
4312 MergeDecision.Await((exit) => Effect.suspend(() => exit))
4313
4314 return new StreamImpl<A3 | A4, E | E2, R | R2>(
4315 channel.mergeWith(toChannel(map(self, options.onSelf)), {

Callers 4

fiberRuntime.tsFile · 0.70
stream.tsFile · 0.70
getMatcherFunction · 0.50
Pretty.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected