Nonblocking, concurrent, asynchronous queue.
- Companion:
- object
Value members
Concrete methods
Signals that queue size became less than maxSize.
Signals that queue size became less than maxSize.
- Example:
def aux(): F[Unit] = queue.offer(o).flatMap { case false => queue.canOffer *> aux() case true => Effect[F].unit } aux()
Immediately stop offering and pulling items from the queue.
Immediately stop offering and pulling items from the queue.
Enqueue item. If maxSize reached waits until queue will decrease.
Enqueue item. If maxSize reached waits until queue will decrease.
Offers item
to the queue.
Offers item
to the queue.
- Returns:
true is ok and false if maxSize reached or queue is stopped.
Returns the size of the queue. This property takes into account canOfferCallbacks and pullCallbacks to determine the real size of the queue after all of them are resolved.
Returns the size of the queue. This property takes into account canOfferCallbacks and pullCallbacks to determine the real size of the queue after all of them are resolved.