Readonly
capacitythe maximum number of items the queue can hold, infinity if unbounded.
Readonly
closedwhether the queue is closed
Readonly
sizethe number of items in the queue
Returns the copy of the current items in the queue, in the first-in-first-out (FIFO) order. This is mostly useful for debugging.
close the queue, preventing further enqueue operations but allowing dequeue until exhausted
synchronously dequeue an item if there is one, or return false
An asynchronous queue. This is modelled after:
ConcurrentLinkedQueue
Supported operations:
enqueue
anddequeue
operationsmaybeEnqueue
andmaybeDequeue
operationsAsyncIterable
to drain the queue.Example