qpid::sys::ThreadSafeQueue< T, ContainerType > Class Template Reference

A thread safe queue template. More...

#include <ThreadSafeQueue.h>

Collaboration diagram for qpid::sys::ThreadSafeQueue< T, ContainerType >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void push (const T &value)
 Push a value onto the back of the queue.
pop ()
 Pop a value from the front of the queue.
bool pop (T &outValue, const Time &timeout)
 If a value becomes available within the timeout, set outValue and return true.
void shutdown ()
 Interrupt threads waiting in pop().
bool isShutdown ()
 True if queue is shutdown.
size_t size ()
 Size of the queue.
bool empty ()
 True if queue is empty.

Detailed Description

template<class T, class ContainerType = std::deque<T>>
class qpid::sys::ThreadSafeQueue< T, ContainerType >

A thread safe queue template.


Member Function Documentation

template<class T, class ContainerType = std::deque<T>>
bool qpid::sys::ThreadSafeQueue< T, ContainerType >::pop ( T &  outValue,
const Time &  timeout 
) [inline]

If a value becomes available within the timeout, set outValue and return true.

Otherwise return false;

template<class T, class ContainerType = std::deque<T>>
T qpid::sys::ThreadSafeQueue< T, ContainerType >::pop (  )  [inline]

Pop a value from the front of the queue.

Waits till value is available.

Exceptions:
ShutdownException if queue is shutdown while waiting.


The documentation for this class was generated from the following file:
Generated on Tue Apr 17 14:22:23 2007 for Qpid by  doxygen 1.4.7