Equalizer 1.0
|
A thread-safe queue with a blocking read access. More...
#include <mtQueue.h>
Public Member Functions | |
MTQueue () | |
Construct a new queue. | |
MTQueue (const MTQueue< T > &from) | |
Construct a copy of a queue. | |
~MTQueue () | |
Destruct this Queue. | |
MTQueue< T > & | operator= (const MTQueue< T > &from) |
Assign the values of another queue. | |
bool | isEmpty () const |
size_t | getSize () const |
size_t | waitSize (const size_t minSize) const |
Wait for the size to be at least the number of given elements. | |
void | clear () |
Reset (empty) the queue. | |
T | pop () |
Retrieve and pop the front element from the queue, may block. | |
bool | tryPop (T &result) |
Retrieve and pop the front element from the queue if it is not empty. | |
bool | getFront (T &result) const |
bool | getBack (T &result) const |
void | push (const T &element) |
Push a new element to the back of the queue. | |
void | push (const std::vector< T > &elements) |
Push a vector of elements to the back of the queue. | |
void | pushFront (const T &element) |
Push a new element to the front of the queue. | |
void | pushFront (const std::vector< T > &elements) |
Push a vector of elements to the front of the queue. |
A thread-safe queue with a blocking read access.
Typically used to communicate between two execution threads.
co::base::MTQueue< T >::MTQueue | ( | ) | [inline] |
co::base::MTQueue< T >::MTQueue | ( | const MTQueue< T > & | from | ) | [inline] |
co::base::MTQueue< T >::~MTQueue | ( | ) | [inline] |
void co::base::MTQueue< T >::clear | ( | ) | [inline] |
bool co::base::MTQueue< T >::getBack | ( | T & | result | ) | const [inline] |
bool co::base::MTQueue< T >::getFront | ( | T & | result | ) | const [inline] |
size_t co::base::MTQueue< T >::getSize | ( | ) | const [inline] |
Definition at line 62 of file mtQueue.h.
Referenced by co::CommandQueue::getSize().
bool co::base::MTQueue< T >::isEmpty | ( | ) | const [inline] |
Definition at line 59 of file mtQueue.h.
Referenced by co::CommandQueue::isEmpty().
MTQueue< T >& co::base::MTQueue< T >::operator= | ( | const MTQueue< T > & | from | ) | [inline] |
T co::base::MTQueue< T >::pop | ( | ) | [inline] |
void co::base::MTQueue< T >::push | ( | const std::vector< T > & | elements | ) | [inline] |
void co::base::MTQueue< T >::push | ( | const T & | element | ) | [inline] |
Push a new element to the back of the queue.
Definition at line 169 of file mtQueue.h.
Referenced by co::CommandQueue::wakeup().
void co::base::MTQueue< T >::pushFront | ( | const std::vector< T > & | elements | ) | [inline] |
void co::base::MTQueue< T >::pushFront | ( | const T & | element | ) | [inline] |
bool co::base::MTQueue< T >::tryPop | ( | T & | result | ) | [inline] |
size_t co::base::MTQueue< T >::waitSize | ( | const size_t | minSize | ) | const [inline] |