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

Method shutdown

packages/effect/src/internal/queue.ts:544–567  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

542 }
543
544 get shutdown(): Effect.Effect<void> {
545 return pipe(
546 core.fiberId,
547 core.flatMap((fiberId) =>
548 pipe(
549 core.sync(() => unsafePollAll(this.putters)),
550 core.flatMap((putters) =>
551 fiberRuntime.forEachConcurrentDiscard(
552 putters,
553 ([_, deferred, isLastItem]) =>
554 isLastItem ?
555 pipe(
556 core.deferredInterruptWith(deferred, fiberId),
557 core.asVoid
558 ) :
559 core.void,
560 false,
561 false
562 )
563 )
564 )
565 )
566 )
567 }
568
569 handleSurplus(
570 iterable: Iterable<A>,

Callers

nothing calls this directly

Calls 3

unsafePollAllFunction · 0.85
syncMethod · 0.80
pipeFunction · 0.70

Tested by

no test coverage detected