effect-io-ai

Package: effect
Module: PubSub

PubSub.bounded

Creates a bounded PubSub with the back pressure strategy. The PubSub will retain messages until they have been taken by all subscribers, applying back pressure to publishers if the PubSub is at capacity.

For best performance use capacities that are powers of two.

Signature

declare const bounded: <A>(capacity: number | { readonly capacity: number; readonly replay?: number | undefined; }) => Effect.Effect<PubSub<A>>

Source

Since v2.0.0