BloombergLP::bdlcc::Queue

This class provides a thread-enabled, double-ended queue of TYPE values.

Synopsis

Declared in <bdlcc_queue.h>

template<class TYPE>
class Queue;

Description

This class provides a thread-enabled implementation of an efficient, in-place, indexable, double-ended queue of parameterized TYPE values. Very efficient access to the underlying bdlc::Queue object is provided, as well as to a bslmt::Mutex and a bslmt::Condition variable, to facilitate thread-safe use of the bdlc::Queue. Note that Queue is not a value-semantic type, but the underlying bdlc::Queue is. In this regard, Queue is a thread-enabled handle for a bdlc::Queue.

Types

NameDescription
InitialCapacity Enable uniform use of an optional integral initial-capacity argument.

Member Functions

NameDescription
Queue [constructor]Constructors
~Queue [destructor]Destroy this container. The behavior is undefined unless all access or modification of the container has completed prior to this call.
condition Return a reference to the modifiable condition variable used by this queue to signal that the queue is not empty.
forcePushFront Append item to the front, ignoring the high-water mark.
highWaterMark Return the high-water mark value for this queue.
insertCondition Return a reference to the condition signaling that the queue is not full.
length Return the number of elements in this queue. Note that if other threads are manipulating the queue, this information may be obsolete by the time it is returned.
mutex Return a reference to the modifiable mutex used by this queue to synchronize access to its underlying bdlc::Queue object.
notEmptyCondition Return the condition variable used by this queue to signal that the queue is not empty.
notFullCondition Return the condition used to signal that this queue is not full.
popBack popBack overloads
popFront popFront overloads
pushBack Append item to the back of this queue.
pushFront Append item to the front of this queue.
queue Return a reference to the modifiable underlying bdlc::Queue object.
removeAll removeAll overloads
timedPopBack Remove the last item into buffer, waiting until timeout if empty.
timedPopFront Remove the first item into buffer, waiting until timeout if empty.
timedPushBack Append item to the back, waiting until timeout if the queue is full.
timedPushFront Append item to the front, waiting until timeout if the queue is full.
tryPopBack tryPopBack overloads
tryPopFront tryPopFront overloads
operator BloombergLP::bslmf::NestedTraitDeclaration<Queue, UsesBslmaAllocator> Declare that this type uses a bslma allocator.