MonitoredQueue Class Template Reference
#include <MonitoredQueue.h>
Inheritance diagram for MonitoredQueue:
Public Member Functions | |
MonitoredQueue () | |
Create a new MonitoredQueue. | |
virtual | ~MonitoredQueue () |
Destroy a MonitoredQueue, delete remaining items. | |
virtual void | add (const T &item) |
virtual bool | add (const T &item, unsigned long timeout) |
virtual T | next () |
virtual T | next (unsigned long timeout) |
virtual void | cancel () |
virtual bool | isCanceled () |
virtual size_t | size () |
virtual size_t | size (unsigned long timeout) |
virtual bool | empty () |
virtual bool | empty (unsigned long timeout) |
virtual void | acquire () |
virtual bool | tryAcquire (unsigned long timeout) |
virtual void | release () |
Detailed Description
template<class T, class LockType, typename StorageType = std::deque<T>>
class ZThread::MonitoredQueue< T, LockType, StorageType >
- Author:
- Eric Crahen <http://www.code-foo.com>
- Date:
- <2003-07-16T20:23:28-0400>
- Version:
- 2.3.0
- Threads calling the empty() methods will be blocked until the BoundedQueue becomes empty.
- Threads calling the next() methods will be blocked until the BoundedQueue has a value to return.
- See also:
- Queue
Member Function Documentation
|
Acquire the Lockable object. This method may or may not block the caller for an indefinite amount of time. Those details are defined by specializations of this class.
Implements Lockable. |
|
Add a value to this Queue.
Implements Queue. |
|
Add a value to this Queue.
Implements Queue. |
|
Cancel this queue.
Implements Queue. |
|
Test whether any values are available in this Queue. The calling thread is blocked until there are no values present in the Queue.
Reimplemented from Queue. |
|
Test whether any values are available in this Queue. The calling thread is blocked until there are no values present in the Queue.
Reimplemented from Queue. |
|
Implements Cancelable. |
|
Retrieve and remove a value from this Queue. If invoked when there are no values present to return then the calling thread will be blocked until a value arrives in the Queue.
Implements Queue. |
|
Retrieve and remove a value from this Queue. If invoked when there are no values present to return then the calling thread will be blocked until a value arrives in the Queue.
Implements Queue. |
|
Release the Lockable object. This method may or may not block the caller for an indefinite amount of time. Those details are defined by specializations of this class.
Implements Lockable. |
|
Implements Queue. |
|
Implements Queue. |
|
Attempt to acquire the Lockable object. This method may or may not block the caller for a definite amount of time. Those details are defined by specializations of this class; however, this method includes a timeout value that can be used to limit the maximum amount of time that a specialization could block.
Implements Lockable. |
The documentation for this class was generated from the following file:
- MonitoredQueue.h