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

Method shutdown

packages/effect/src/PubSub.ts:2362–2370  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2360 > = MutableList.make()
2361
2362 get shutdown(): Effect.Effect<void> {
2363 return Effect.withFiber((fiber) =>
2364 Effect.forEach(
2365 MutableList.takeAll(this.publishers),
2366 ([_, deferred, last]) => last ? Deferred.interruptWith(deferred, fiber.id) : Effect.void,
2367 { concurrency: "unbounded", discard: true }
2368 )
2369 )
2370 }
2371
2372 handleSurplus(
2373 pubsub: PubSub.Atomic<A>,

Callers

nothing calls this directly

Calls 2

forEachMethod · 0.65
takeAllMethod · 0.65

Tested by

no test coverage detected