effect-io-ai

Package: effect
Module: PubSub

PubSub.sliding

Creates a bounded PubSub with the sliding strategy. The PubSub will add new messages and drop old messages if the PubSub is at capacity.

For best performance use capacities that are powers of two.

Signature

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

Source

Since v2.0.0