CommandQueue

A thread-safe FIFO queue of T.

version(Windows)
class CommandQueue (
T
) {}

Constructors

this
this()

Create an empty queue with its own mutex.

Members

Functions

drainAll
T[] drainAll()

Atomically remove and return all queued items, in insertion order.

empty
bool empty()

Whether the queue currently holds no items.

push
void push(T item)

Append an item. Safe to call from any thread.

Meta