Public Member Functions | Private Attributes
megatree::BlockingQueue< T > Class Template Reference

#include <blocking_queue.h>

List of all members.

Public Member Functions

 BlockingQueue (size_t max_size=WRITE_QUEUE_SIZE)
dequeue ()
void dequeueBatch (size_t batch_size, std::vector< T > &batch)
size_t enqueue (const T &item)
void unblockAll ()

Private Attributes

boost::condition dequeue_condition
boost::condition enqueue_condition
size_t max_size_
boost::mutex mutex_
std::deque< T > queue_

Detailed Description

template<class T>
class megatree::BlockingQueue< T >

Definition at line 16 of file blocking_queue.h.


Constructor & Destructor Documentation

template<class T >
megatree::BlockingQueue< T >::BlockingQueue ( size_t  max_size = WRITE_QUEUE_SIZE) [inline]

Definition at line 19 of file blocking_queue.h.


Member Function Documentation

template<class T >
T megatree::BlockingQueue< T >::dequeue ( ) [inline]

Definition at line 47 of file blocking_queue.h.

template<class T >
void megatree::BlockingQueue< T >::dequeueBatch ( size_t  batch_size,
std::vector< T > &  batch 
) [inline]

Definition at line 66 of file blocking_queue.h.

template<class T >
size_t megatree::BlockingQueue< T >::enqueue ( const T &  item) [inline]

Definition at line 27 of file blocking_queue.h.

template<class T >
void megatree::BlockingQueue< T >::unblockAll ( ) [inline]

Definition at line 87 of file blocking_queue.h.


Member Data Documentation

template<class T >
boost::condition megatree::BlockingQueue< T >::dequeue_condition [private]

Definition at line 97 of file blocking_queue.h.

template<class T >
boost::condition megatree::BlockingQueue< T >::enqueue_condition [private]

Definition at line 97 of file blocking_queue.h.

template<class T >
size_t megatree::BlockingQueue< T >::max_size_ [private]

Definition at line 94 of file blocking_queue.h.

template<class T >
boost::mutex megatree::BlockingQueue< T >::mutex_ [private]

Definition at line 96 of file blocking_queue.h.

template<class T >
std::deque<T> megatree::BlockingQueue< T >::queue_ [private]

Definition at line 95 of file blocking_queue.h.


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


megatree_core
Author(s): Stuart Glaser
autogenerated on Thu Nov 28 2013 11:30:23