Public Member Functions | List of all members
dx::BlockingQueue< T > Class Template Reference

#include <bqueue.h>

Public Member Functions

 BlockingQueue (int capacity_=-1)
 
void setCapacity (int capacity_)
 
int getCapacity () const
 
void produce (T chunk)
 
consume ()
 
size_t size () const
 
bool empty () const
 

Detailed Description

template<typename T>
class dx::BlockingQueue< T >

A synchronized, blocking queue of chunks. This provides a way for chunks to be passed between worker threads.

The 'produce' operation is used to insert a chunk into the queue. This operation blocks if the capacity of the queue has been reached.

The 'consume' operation is used to obtain a remove a chunk from the queue, returning it to the consumer. This operation blocks if there are no chunks in the queue.


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