DUNE: Uniform Navigational Environment
2.4.0
|
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(), and DUNE::Tasks::Recipient::~Recipient().
|
inline |
Retrieve the first element of the queue and removes it from the queue.
Referenced by DUNE::Hardware::BasicModem::readLine(), DUNE::Hardware::BasicModem::readRaw(), DUNE::Tasks::Recipient::runCallBacks(), and DUNE::Tasks::Recipient::~Recipient().
|
inline |
Adds an element to the end of the queue.
Signaling waiting threads.
v | variable to insert. |
Referenced by DUNE::Tasks::Recipient::put().
|
inline |
Retrieve the number of elements currently in the queue.
Referenced by DUNE::Tasks::Recipient::runCallBacks().
|
inline |
Wait for items to be available.
timeout | timeout in seconds, use a negative number to wait forever. |
Referenced by DUNE::Hardware::BasicModem::readLine(), DUNE::Hardware::BasicModem::readRaw(), and DUNE::Tasks::Recipient::waitForMessages().