Clears the queue of all offered items or promises.
Clears the whole queue, then offers one item.
Enqueues an item in the queue, or feeds it to a waiting consumer if there are such waiting consumers.
Enqueues an item in the queue, or feeds it to a waiting consumer if there are such waiting consumers.
If there are elements in the queue, returns one,
otherwise returns a Future
that waits (asynchronously)
until items are offered.
If there are elements in the queue, returns one,
otherwise returns a Future
that waits (asynchronously)
until items are offered.
And asynchronous queue implementation.
On
poll
, if there are queued elements, it returns oe immediately, otherwise it returns aFuture