qpid::sys::BlockingQueue< T > Class Template Reference

A simple blocking queue template. More...

#include <BlockingQueue.h>

Inheritance diagram for qpid::sys::BlockingQueue< T >:

Inheritance graph
[legend]
Collaboration diagram for qpid::sys::BlockingQueue< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

pop ()
 Block until there is a value to pop.
bool tryPop (T &outValue)
 Non-blocking pop.
tryPop (const T &valueIfEmpty=T())
 Non-blocking pop.
void push (const T &t)
 Push a value onto the queue.
void close ()
 Close the queue.
void open ()
 Open a closed queue.
bool isClosed () const
bool empty () const
size_t size () const

Detailed Description

template<class T>
class qpid::sys::BlockingQueue< T >

A simple blocking queue template.


Member Function Documentation

template<class T>
void qpid::sys::BlockingQueue< T >::close (  )  [inline]

Close the queue.

Throws ClosedException in threads waiting in pop(). Blocks till all waiting threads have been notified.

template<class T>
T qpid::sys::BlockingQueue< T >::tryPop ( const T &  valueIfEmpty = T()  )  [inline]

Non-blocking pop.

If there is a value return it, else return valueIfEmpty.

template<class T>
bool qpid::sys::BlockingQueue< T >::tryPop ( T &  outValue  )  [inline]

Non-blocking pop.

If there is a value set outValue and return true, else return false;


The documentation for this class was generated from the following file:
Generated on Thu Apr 10 11:09:10 2008 for Qpid by  doxygen 1.4.7