Implement A Concurrent Queue in Cats Effect
Briefly

The queue will be bounded with a predefined capacity. Once the capacity is reached a put will semantically block until new space is available. Similarly, a take will semantically block when the queue is empty up until elements are inserted.
We'll track the offer calls waiting for free space in offers and, similarly take calls waiting for new elements in takes. State updates are handled through a single Ref.
Read at Medium
[
|
]