The sb-queue
module, loadable by
(require :sb-queue)
provides a thread-safe lockless FIFO queues.
Class precedence list:
queue, structure-object, t
Lock-free thread safe queue.
enqueue
can be used to add objects to the queue, anddequeue
retrieves items from the queue infifo
order.
Retrieves the oldest value in
queue
and returns it as the primary value, andt
as secondary value. If the queue is empty, returnsnil
as both primary and secondary value.
Returns the contents of
queue
as a list without removing them from thequeue
. Mainly useful for manual examination of queue state.
Returns a new
queue
withname
and contents of theinitial-contents
sequence enqueued.
Returns the number of objects in
queue
. Mainly useful for manual examination of queue state, and inprint-object
methods: inefficient as it walks the entire queue.