A concurrent queue backed by a lock-free Deque.
Values are wrapped in ValueLink internally, hiding the link machinery. Null values are not permitted (poll returns nil to indicate empty).
Thread-safe for concurrent add/poll operations on JVM. Single-threaded on ClojureScript (backed by Deque).
A concurrent queue backed by a lock-free Deque. Values are wrapped in ValueLink internally, hiding the link machinery. Null values are not permitted (poll returns nil to indicate empty). Thread-safe for concurrent add/poll operations on JVM. Single-threaded on ClojureScript (backed by Deque).
(add queue item)Add a value to the tail of the queue.
Returns a Link that can be used for O(1) removal via (queue/remove link).
Add a value to the tail of the queue. Returns a Link that can be used for O(1) removal via (queue/remove link).
(forEach [sym queue] & body)Iterate over all values in the queue.
Iterate over all values in the queue.
(isEmpty queue)Check if the queue is empty.
Check if the queue is empty.
(iterator queue)Get an iterator over the queue values.
Get an iterator over the queue values.
(iteratorHasNext it)Check if the iterator has more elements.
Check if the iterator has more elements.
(iteratorNext it)Get the next value from the iterator.
Get the next value from the iterator.
(poll queue)Remove and return the first value from the queue, or nil if empty.
Remove and return the first value from the queue, or nil if empty.
(remove link)Remove a link from its queue.
Returns true if this call initiated the removal, false if already removed.
Remove a link from its queue. Returns true if this call initiated the removal, false if already removed.
(size queue)Get the number of values in the queue.
Get the number of values in the queue.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |