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

Function ensureCapacity

packages/effect/src/PubSub.ts:2322–2326  ·  view source on GitHub ↗
(capacity: number)

Source from the content-addressed store, hash-verified

2320): PubSub<A> => new PubSubImpl(pubsub, subscribers, scope, shutdownHook, shutdownFlag, strategy)
2321
2322const ensureCapacity = (capacity: number): void => {
2323 if (capacity <= 0) {
2324 throw new Error(`Cannot construct PubSub with capacity of ${capacity}`)
2325 }
2326}
2327
2328// -----------------------------------------------------------------------------
2329// PubSub.Strategy

Callers 1

makeAtomicBoundedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected