This class provides a thread‐safe unbounded queue of values that assumes a single consumer thread.
Synopsis
Declared in <bdlcc_singleconsumerqueueimpl.h>
template<
class TYPE,
class ATOMIC_OP,
class MUTEX,
class CONDITION>
class SingleConsumerQueueImpl;
Description
The types ATOMIC_OP, MUTEX, and CONDITION are exposed for testing. Typical usage is with bsls::AtomicOperations for ATOMIC_OP, bslmt::Mutex for MUTEX, and bslmt::Condition for CONDITION.
Type Aliases
Name |
Description |
The type for elements stored in this queue. |
Enums
Name |
Description |
Status codes returned by queue operations. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this container. The behavior is undefined unless all access or modification of the container has completed prior to this call. |
Return the allocator used by this object to supply memory. |
|
Disable dequeueing from this queue. |
|
Disable enqueueing into this queue. |
|
Enable dequeueing. If the queue is not dequeue disabled, this call has no effect. |
|
Enable queuing. If the queue is not enqueue disabled, this call has no effect. |
|
Return |
|
Return |
|
Return |
|
Return |
|
Return the number of elements currently in this queue. |
|
Remove the front element into |
|
|
|
Remove all items currently in this queue. |
|
Attempt to remove the front element without blocking. |
|
|
|
Block until all elements in this queue are removed. |
|
|
Declare that this type uses a |
Friends
Name |
Description |
|
This class implements a guard that automatically invokes |
|
This class implements a guard that automatically invokes |
|
This class implements a proctor that, unless its |
Created with MrDocs