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

Function bounded

packages/effect/src/PubSub.ts:334–343  ·  view source on GitHub ↗
(
  capacity: number | {
    readonly capacity: number
    readonly replay?: number | undefined
  }
)

Source from the content-addressed store, hash-verified

332 * @since 2.0.0
333 */
334export const bounded = <A>(
335 capacity: number | {
336 readonly capacity: number
337 readonly replay?: number | undefined
338 }
339): Effect.Effect<PubSub<A>> =>
340 make({
341 atomicPubSub: () => makeAtomicBounded(capacity),
342 strategy: () => new BackPressureStrategy()
343 })
344
345/**
346 * Creates a bounded `PubSub` with the dropping strategy. The `PubSub` will drop new

Callers

nothing calls this directly

Calls 2

makeAtomicBoundedFunction · 0.85
makeFunction · 0.70

Tested by

no test coverage detected