async/bounded_work_queue_utils library
Bounded async work queue with backpressure — roadmap #654.
A fixed-capacity producer/consumer channel: push enqueues an item but, when
the buffer is full, returns a future that doesn't complete until a consumer
frees a slot — so a fast producer is throttled to the consumer's pace instead
of growing memory without bound. pull symmetrically waits when the buffer is
empty. Hand-off is FIFO and direct (a waiting consumer gets a pushed item
without it touching the buffer).
Use this to bridge a burst source to a rate-limited sink (the backpressure is
the point); for fire-and-forget concurrency use TaskScheduler instead.
Classes
-
BoundedWorkQueue<
T> -
A bounded FIFO channel of
Twith blocking push/pull and backpressure.