util::PCQueue< T > Class Template Reference

#include <pcqueue.hh>

Inheritance diagram for util::PCQueue< T >:

Inheritance graph
[legend]
Collaboration diagram for util::PCQueue< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PCQueue (size_t size)
void Produce (const T &val)
TConsume (T &out)
T Consume ()


Detailed Description

template<class T>
class util::PCQueue< T >

Producer consumer queue safe for multiple producers and multiple consumers. T must be default constructable and have operator=. The value is copied twice for Consume(T &out) or three times for Consume(), so larger objects should be passed via pointer. Strong exception guarantee if operator= throws. Undefined if semaphores throw.

Definition at line 82 of file pcqueue.hh.


Constructor & Destructor Documentation

template<class T>
util::PCQueue< T >::PCQueue ( size_t  size  )  [inline, explicit]

Definition at line 84 of file pcqueue.hh.


Member Function Documentation

template<class T>
T util::PCQueue< T >::Consume (  )  [inline]

Definition at line 128 of file pcqueue.hh.

Referenced by util::PCQueue< Block >::Consume().

Here is the caller graph for this function:

template<class T>
T& util::PCQueue< T >::Consume ( T out  )  [inline]

Definition at line 109 of file pcqueue.hh.

Referenced by util::stream::Link::Init(), util::Worker< HandlerT >::operator()(), util::stream::Link::operator++(), and util::stream::RewindableStream::Poison().

Here is the caller graph for this function:

template<class T>
void util::PCQueue< T >::Produce ( const T val  )  [inline]


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

Generated on Thu Jul 6 00:34:50 2017 for Moses by  doxygen 1.5.9