Dequeues as many items as possible synchronously, and returns them in a single batch in an already-completed future.
Dequeues as many items as possible synchronously, and returns them in a single batch in an already-completed future.
If no items can be dequeued synchronously, returns a future that will complete with a single item, via an ordinary
call to dequeue
.
Try to dequeue an item synchronously if the queue is not empty.
Try to dequeue an item synchronously if the queue is not empty. This competes synchronously with other calls to
dequeue
and tryDequeue
, and fairness is not guaranteed, so this method technically may never complete.
A queue where both insertion and removal are asynchronous, based on a maximum queue size.