bounded-queue

A strict, immutable, thread-safe, single-ended, bounded queue.

https://gitlab.com/fosskers/bounded-queue

LTS Haskell 22.39:1.0.0
Stackage Nightly 2024-10-29:1.0.0
Latest on Hackage:1.0.0

See all snapshots bounded-queue appears in

BSD-3-Clause licensed by Colin Woodbury
Maintained by [email protected]
This version can be pinned in stack with:bounded-queue-1.0.0@sha256:b127b7e4d6c6f11f75fbb2a36d55aa54666e80925496592e995756322c92150b,1434

Module documentation for 1.0.0

bounded-queue

This library provides a strict, immutable, thread-safe, single-ended, bounded queue. When the insert limit is reached and a cons is attempted, this BQueue automatically drops old entries off its end. Thus, writes always succeed and never block.

This data structure is intended as a “sliding window” over some stream of data, where we wish old entries to be naturally forgotten. Since this is an immutable data structure and not a concurrent queue, we provide instances for the usual useful typeclasses with which one can perform analysis over the entire “window”.