effect-io-ai

Package: effect
Module: Queue

Queue.dropping

Makes a new bounded Queue with the dropping strategy.

When the capacity of the queue is reached, new elements will be dropped and the old elements will remain.

Note: When possible use only power of 2 capacities; this will provide better performance by utilising an optimised version of the underlying RingBuffer.

Signature

declare const dropping: <A>(requestedCapacity: number) => Effect.Effect<Queue<A>>

Source

Since v2.0.0