Queue

Multiple producer, "single" consumer thread safe queue.

The value may be T.init if multiple consumers try to pop a value at the same time.

Constructors

this
this(Mutex mtx)
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Aliases

PopReturnType
alias PopReturnType = Item!(T*)
Undocumented in source.
T
alias T = U
Undocumented in source.
T
alias T = RawT
Undocumented in source.

Functions

empty
bool empty()
Undocumented in source. Be warned that the author may not have intended to support it.
length
size_t length()
Undocumented in source. Be warned that the author may not have intended to support it.
pop
Item!(T*) pop()
Undocumented in source. Be warned that the author may not have intended to support it.
put
bool put(T* a)
Undocumented in source. Be warned that the author may not have intended to support it.
put
bool put(T a)
Undocumented in source. Be warned that the author may not have intended to support it.
teardown
void teardown(void delegate(ref T) deinit)

clear the queue and permanently shut it down by rejecting put messages.

Manifest constants

AsPointer
enum AsPointer;
Undocumented in source.
AsPointer
enum AsPointer;
Undocumented in source.

Structs

Item
struct Item(TT)
Undocumented in source.

Meta