Base interface for blocking queues. More...
#include <BlockingQueue.hpp>
Public Member Functions | |
virtual T | dequeue ()=0 |
Dequeue an object, waiting for an object to become available if the queue is empty. More... | |
virtual bool | empty () const =0 |
Returns true if the queue is empty. More... | |
virtual void | enqueue (T &&element)=0 |
Enqueue an object, waiting for space to be available if the queue is full. More... | |
virtual bool | full () const =0 |
Returns true if the queue is full. More... | |
virtual T | tryDequeue ()=0 |
Try to dequeue an object. More... | |
virtual T | tryDequeue (std::chrono::milliseconds waitTime)=0 |
Try to dequeue an object, waiting for the specified time if the queue is empty. More... | |
Base interface for blocking queues.
|
pure virtual |
Dequeue an object, waiting for an object to become available if the queue is empty.
Implements Queue< T >.
Implemented in SharedMemoryQueue< T >, and ArrayBlockingQueue< T >.
|
pure virtual |
Returns true if the queue is empty.
Given the concurrent nature of block queues, this operation is approximate.
Implements Queue< T >.
Implemented in SharedMemoryQueue< T >, and ArrayBlockingQueue< T >.
|
pure virtual |
Enqueue an object, waiting for space to be available if the queue is full.
The supplied element is moved during enqueuing.
Implements Queue< T >.
Implemented in SharedMemoryQueue< T >, and ArrayBlockingQueue< T >.
|
pure virtual |
Returns true if the queue is full.
Given the concurrent nature of block queues, this operation is approximate.
Implemented in SharedMemoryQueue< T >, and ArrayBlockingQueue< T >.
|
pure virtual |
Try to dequeue an object.
if no dequeue was made, a default constructed object is returned.
Implemented in SharedMemoryQueue< T >, and ArrayBlockingQueue< T >.
|
pure virtual |
Try to dequeue an object, waiting for the specified time if the queue is empty.
if no dequeue was made, a default constructed object is returned.
Implemented in SharedMemoryQueue< T >, and ArrayBlockingQueue< T >.