#include <Queue.hpp>
Public Member Functions | |
void | add (const T &item) |
Add an item to the Queue for processing. More... | |
void | cancel_get () |
Cancel the current read operation. More... | |
bool | canceled () |
Returns if in canceled state. More... | |
T | get_next () |
get the next available item in the message Queue. More... | |
T | get_next_non_blocking () |
get the next available item, but do not block if there are none available instead throw() More... | |
bool | has_next () |
Return true if there is currently data available. More... | |
Queue () | |
void | reset () |
Reset canceled state to false. More... | |
~Queue () | |
Thread safe Queue for message processing.
Queue allows the user to push messages in a thread-safe non-blocking way and read queue messages in either blocking or non-blocking methods. The blocking methods allow a thread to wait on new messages without being in a busy loop and be notified when the new message is received.
|
inline |
|
inline |
|
inline |
Add an item to the Queue for processing.
[in] | item | item to add |
|
inline |
Cancel the current read operation.
Pending readers will be woken and with throw an exception.
|
inline |
Returns if in canceled state.
|
inline |
get the next available item in the message Queue.
Method blocks until a new item is available
|
inline |
get the next available item, but do not block if there are none available instead throw()
|
inline |
Return true if there is currently data available.
|
inline |
Reset canceled state to false.