#include <blocking_queue.h>
Public Member Functions | |
BlockingQueue (size_t max_size=WRITE_QUEUE_SIZE) | |
T | 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_ |
Definition at line 16 of file blocking_queue.h.
megatree::BlockingQueue< T >::BlockingQueue | ( | size_t | max_size = WRITE_QUEUE_SIZE | ) | [inline] |
Definition at line 19 of file blocking_queue.h.
T megatree::BlockingQueue< T >::dequeue | ( | ) | [inline] |
Definition at line 47 of file blocking_queue.h.
void megatree::BlockingQueue< T >::dequeueBatch | ( | size_t | batch_size, |
std::vector< T > & | batch | ||
) | [inline] |
Definition at line 66 of file blocking_queue.h.
size_t megatree::BlockingQueue< T >::enqueue | ( | const T & | item | ) | [inline] |
Definition at line 27 of file blocking_queue.h.
void megatree::BlockingQueue< T >::unblockAll | ( | ) | [inline] |
Definition at line 87 of file blocking_queue.h.
boost::condition megatree::BlockingQueue< T >::dequeue_condition [private] |
Definition at line 97 of file blocking_queue.h.
boost::condition megatree::BlockingQueue< T >::enqueue_condition [private] |
Definition at line 97 of file blocking_queue.h.
size_t megatree::BlockingQueue< T >::max_size_ [private] |
Definition at line 94 of file blocking_queue.h.
boost::mutex megatree::BlockingQueue< T >::mutex_ [private] |
Definition at line 96 of file blocking_queue.h.
std::deque<T> megatree::BlockingQueue< T >::queue_ [private] |
Definition at line 95 of file blocking_queue.h.