nc::blocking_queue

NAME
SYNOPSIS
Constructor & Destructor Documentation
Member Function Documentation
Member Data Documentation
Author

NAME

nc::blocking_queue −

SYNOPSIS

#include <acsncBlockingQueue.h>

Public Member Functions

blocking_queue ()

~blocking_queue ()

void push (event_info< T > &data)

event_info< T > pop ()

void pop_no_block ()

unsigned int size ()

void unblock ()

Private Attributes

std::queue< event_info< T > > buffer

pthread_mutex_t mutex

pthread_cond_t cond

template<class T> class nc::blocking_queue< T >

Constructor & Destructor Documentation

template<class T> nc::blocking_queue< T >::blocking_queue ()

template<class T> nc::blocking_queue< T >::~blocking_queue ()

Member Function Documentation

template<class T> event_info<T> nc::blocking_queue< T >::pop () Return a event_info item from buffer, remove this item from buffer. This methods blocks if the queue is empty.

Exceptions:

interrupted_blocking_queue if the queue was interrupted

See also:

event_info

template<class T> void nc::blocking_queue< T >::pop_no_block () Pop one event from buffer without returning it. This method does not block of the size of the queue is 0 (zero)

template<class T> void nc::blocking_queue< T >::push (event_info< T > & data)

template<class T> unsigned int nc::blocking_queue< T >::size () Returns the current size of the queue. This method does not block to get the current size of the buffer

template<class T> void nc::blocking_queue< T >::unblock () Interrupts the waiting of the threads blocked in pop method.

See also:

blocking_queue::pop()

Member Data Documentation

template<class T> std::queue<event_info<T> > nc::blocking_queue< T >::buffer [private]

template<class T> pthread_cond_t nc::blocking_queue< T >::cond [private]

template<class T> pthread_mutex_t nc::blocking_queue< T >::mutex [private]

Author

Generated automatically by Doxygen for ACS-2015.2 C++ API from the source code.