SyncQueue - queue with access synchronized by mutex.
Inheritance:
Public Methods
-
SyncQueue()
- Creates empty queue
-
bool empty() const throw(SyncQueueDoneException)
- Returns true if queue is currently empty
-
size_type size() const throw(SyncQueueDoneException)
- Returns current queue size
-
void push(const queue<_Tp>::value_type& __x) throw(SyncQueueDoneException)
- Adds element to end of queue
-
const queue<_Tp> ::value_type pop(long timeout_ms=-1) throw(SyncQueueDoneException, FWException)
- Pops element from front of queue.
-
void shutdown()
- Shut down this queue.
Protected Fields
-
Mutex mutex
-
Cond cond
-
bool down
Documentation
SyncQueue - queue with access synchronized by mutex.
Mutex mutex
Cond cond
bool down
SyncQueue()
-
Creates empty queue
bool empty() const throw(SyncQueueDoneException)
-
Returns true if queue is currently empty
- Throws:
- SyncQueueDoneException if queue have been already shut down
size_type size() const throw(SyncQueueDoneException)
-
Returns current queue size
- Throws:
- SyncQueueDoneException if queue have been already shut down
void push(const queue<_Tp>::value_type& __x) throw(SyncQueueDoneException)
-
Adds element to end of queue
- Throws:
- SyncQueueDoneException if queue have been already shut down
const 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.
void 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++.