Liking cljdoc? Tell your friends :D

co.multiply.conc.queue

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).
raw docstring

addclj/smacro

(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).
raw docstring

forEachclj/smacro

(forEach [sym queue] & body)

Iterate over all values in the queue.

Iterate over all values in the queue.
raw docstring

isEmptyclj/smacro

(isEmpty queue)

Check if the queue is empty.

Check if the queue is empty.
raw docstring

iteratorclj/smacro

(iterator queue)

Get an iterator over the queue values.

Get an iterator over the queue values.
raw docstring

iteratorHasNextclj/smacro

(iteratorHasNext it)

Check if the iterator has more elements.

Check if the iterator has more elements.
raw docstring

iteratorNextclj/smacro

(iteratorNext it)

Get the next value from the iterator.

Get the next value from the iterator.
raw docstring

pollclj/smacro

(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.
raw docstring

queueclj/smacro

(queue)

Create a new concurrent queue.

Create a new concurrent queue.
raw docstring

removeclj/smacro

(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.
raw docstring

sizeclj/smacro

(size queue)

Get the number of values in the queue.

Get the number of values in the queue.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close