template<class _Tp> class libfwbuilder::SyncQueue

SyncQueue - queue with access synchronized by mutex.

Inheritance:


Public Methods

[more] SyncQueue()
Creates empty queue
[more]bool empty() const throw(SyncQueueDoneException)
Returns true if queue is currently empty
[more]size_type size() const throw(SyncQueueDoneException)
Returns current queue size
[more]void push(const queue<_Tp>::value_type& __x) throw(SyncQueueDoneException)
Adds element to end of queue
[more]const queue<_Tp> ::value_type pop(long timeout_ms=-1) throw(SyncQueueDoneException, FWException)
Pops element from front of queue.
[more]void shutdown()
Shut down this queue.

Protected Fields

[more]Mutex mutex
[more]Cond cond
[more]bool down


Documentation

SyncQueue - queue with access synchronized by mutex.

oMutex mutex

oCond cond

obool down

o SyncQueue()
Creates empty queue

obool empty() const throw(SyncQueueDoneException)
Returns true if queue is currently empty

Throws:
SyncQueueDoneException if queue have been already shut down

osize_type size() const throw(SyncQueueDoneException)
Returns current queue size

Throws:
SyncQueueDoneException if queue have been already shut down

ovoid push(const queue<_Tp>::value_type& __x) throw(SyncQueueDoneException)
Adds element to end of queue

Throws:
SyncQueueDoneException if queue have been already shut down

oconst queue<_Tp> ::value_type pop(long timeout_ms=-1) throw(SyncQueueDoneException, FWException)
Pops element from front of queue. It queue is empty, blocks according to timeout_ms parameter.

Throws:
FWException if timeout occured
SyncQueueDoneException if shutdown() was called
Parameters:
timeout_ms - timeout in milliseconds. -1 means wait forewer.

ovoid shutdown()
Shut down this queue. All waiting threads will be released throwing SyncQueueDoneException exception.


This class has no child classes.
See Also:
SyncQueueDoneException

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.