Readonlycapacitythe maximum number of items the queue can hold, infinity if unbounded.
Readonlyclosedwhether the queue is closed
Readonlysizethe 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:
ConcurrentLinkedQueueSupported operations:
enqueueanddequeueoperationsmaybeEnqueueandmaybeDequeueoperationsAsyncIterableto drain the queue.Example