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

Method shutdown

packages/effect/src/internal/pubsub.ts:1404–1419  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1402 > = MutableQueue.unbounded()
1403
1404 get shutdown(): Effect.Effect<void> {
1405 return core.flatMap(core.fiberId, (fiberId) =>
1406 core.flatMap(
1407 core.sync(() => unsafePollAllQueue(this.publishers)),
1408 (publishers) =>
1409 fiberRuntime.forEachConcurrentDiscard(
1410 publishers,
1411 ([_, deferred, last]) =>
1412 last ?
1413 pipe(core.deferredInterruptWith(deferred, fiberId), core.asVoid) :
1414 core.void,
1415 false,
1416 false
1417 )
1418 ))
1419 }
1420
1421 handleSurplus(
1422 pubsub: AtomicPubSub<A>,

Callers

nothing calls this directly

Calls 3

unsafePollAllQueueFunction · 0.85
syncMethod · 0.80
pipeFunction · 0.70

Tested by

no test coverage detected