iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::SynchroQueue< T > Class Template Reference

#include <nrt/Core/Design/SynchroQueue.H>

template<class T>
class nrt::SynchroQueue< T >

SynchroQueue is a thread-safe synchronized producer/consumer queue.

SynchroQueue is designed for use in producer/consumer scenarios where multiple threads wish to push and pop data onto/from the queue asynchronously. Threads that try to pop data when the queue is empty will sleep until data is actually available.

Definition at line 50 of file SynchroQueue.H.

Public Member Functions

 SynchroQueue ()
 Create a new SynchroQueue with no data.
void push (T const &val)
 Push a new data element onto the queue.
pop ()
 Pop a data element off of the queue, potentially sleeping until one is available.
size_t const size ()
 Get the number of elements in the queue.

The documentation for this class was generated from the following files: