Wraps a Queue to make all read/write operations thread safe. More...
Public Member Functions | |
void | Enqueue (T value) |
Adds a value to the end of the queue. More... | |
T | Dequeue () |
Removes the first value in the queue. More... | |
bool | TryDequeue (out T outValue) |
Tries to remove and return the object at the beginning of the queue. More... | |
T | Peek () |
Returns the first value without removing it from the queue. More... | |
void | Clear () |
Removes everything from the queue. More... | |
T[] | ToArray () |
Converts the queueto an array. More... | |
Properties | |
int | Count [get] |
Number of values in the queue. More... | |
Wraps a Queue to make all read/write operations thread safe.
T |
void KS.Reactor.ksAtomicQueue< T >.Clear | ( | ) |
Removes everything from the queue.
T KS.Reactor.ksAtomicQueue< T >.Dequeue | ( | ) |
Removes the first value in the queue.
void KS.Reactor.ksAtomicQueue< T >.Enqueue | ( | T | value | ) |
Adds a value to the end of the queue.
value | Value to add. |
T KS.Reactor.ksAtomicQueue< T >.Peek | ( | ) |
Returns the first value without removing it from the queue.
T [] KS.Reactor.ksAtomicQueue< T >.ToArray | ( | ) |
Converts the queueto an array.
bool KS.Reactor.ksAtomicQueue< T >.TryDequeue | ( | out T | outValue | ) |
Tries to remove and return the object at the beginning of the queue.
outValue | If the operation was successful, outValue contains the object removed. If no object was available to be removed, the value is the default T value. |
|
get |
Number of values in the queue.