DUNE: Uniform Navigational Environment
2019.02.1
|
The TSQueue is a thread-safe implementation of a FIFO (first-in, first-out) data structure.
Public Member Functions | |
TSQueue (void) | |
void | push (const T &v) |
T | pop (void) |
bool | waitForItems (double timeout=-1.0) |
bool | empty (void) |
unsigned | size (void) |
void | close (void) |
bool | closed (void) |
|
inline |
Constructor.
|
inline |
|
inline |
|
inline |
Verify if the queue has elements.
Referenced by DUNE::Concurrency::TSQueue< UCTK::DUNE::Hardware::UCTK::Frame * >::waitForItems().
|
inline |
Retrieve the first element of the queue and removes it from the queue.
Referenced by DUNE::Hardware::BasicModem::readLine(), and DUNE::Hardware::BasicModem::readRaw().
|
inline |
Adds an element to the end of the queue.
Signaling waiting threads.
v | variable to insert. |
Referenced by DUNE::Hardware::BasicModem::flushInput().
|
inline |
Retrieve the number of elements currently in the queue.
|
inline |
Wait for items to be available.
timeout | timeout in seconds, use a negative number to wait forever. |
Referenced by DUNE::Hardware::BasicModem::readLine(), and DUNE::Hardware::BasicModem::readRaw().