From 8349f315b5c67332ce60f30a12780cc1422b6d70 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 14 Sep 2023 22:40:26 -0400 Subject: [PATCH] some doc --- src/bounded_queue.mli | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/bounded_queue.mli b/src/bounded_queue.mli index e764f920..0be0b692 100644 --- a/src/bounded_queue.mli +++ b/src/bounded_queue.mli @@ -1,4 +1,17 @@ -(** A blocking queue of finite size. *) +(** A blocking queue of finite size. + + This queue, while still using locks underneath + (like the regular blocking queue) should be enough for + usage under reasonable contention. + + The bounded size is helpful whenever some form of backpressure is + desirable: if the queue is used to communicate between producer(s) + and consumer(s), the consumer(s) can limit the rate at which + producer(s) send new work down their way. + Whenever the queue is full, means that producer(s) will have to + wait before pushing new work. + + @since NEXT_RELEASE *) type 'a t (** A bounded queue. *)