[#BloombergLP-bdlcc-Queue] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::Queue :relfileprefix: ../../ :mrdocs: This class provides a thread‐enabled, double‐ended queue of `TYPE` values. == Synopsis Declared in `<bdlcc_queue.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- 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 [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlcc/Queue/InitialCapacity.adoc[`InitialCapacity`] | Enable uniform use of an optional integral initial‐capacity argument. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlcc/Queue/2constructor-07.adoc[`Queue`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlcc/Queue/2destructor.adoc[`~Queue`] [.small]#[destructor]# | Destroy this container. The behavior is undefined unless all access or modification of the container has completed prior to this call. | xref:BloombergLP/bdlcc/Queue/condition.adoc[`condition`] | Return a reference to the modifiable condition variable used by this queue to signal that the queue is not empty. | xref:BloombergLP/bdlcc/Queue/forcePushFront.adoc[`forcePushFront`] | Append `item` to the front, ignoring the high‐water mark. | xref:BloombergLP/bdlcc/Queue/highWaterMark.adoc[`highWaterMark`] | Return the high‐water mark value for this queue. | xref:BloombergLP/bdlcc/Queue/insertCondition.adoc[`insertCondition`] | Return a reference to the condition signaling that the queue is not full. | xref:BloombergLP/bdlcc/Queue/length.adoc[`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. | xref:BloombergLP/bdlcc/Queue/mutex.adoc[`mutex`] | Return a reference to the modifiable mutex used by this queue to synchronize access to its underlying `bdlc::Queue` object. | xref:BloombergLP/bdlcc/Queue/notEmptyCondition.adoc[`notEmptyCondition`] | Return the condition variable used by this queue to signal that the queue is not empty. | xref:BloombergLP/bdlcc/Queue/notFullCondition.adoc[`notFullCondition`] | Return the condition used to signal that this queue is not full. | xref:BloombergLP/bdlcc/Queue/popBack-0a.adoc[`popBack`] | `popBack` overloads | xref:BloombergLP/bdlcc/Queue/popFront-08.adoc[`popFront`] | `popFront` overloads | xref:BloombergLP/bdlcc/Queue/pushBack.adoc[`pushBack`] | Append `item` to the back of this queue. | xref:BloombergLP/bdlcc/Queue/pushFront.adoc[`pushFront`] | Append `item` to the front of this queue. | xref:BloombergLP/bdlcc/Queue/queue.adoc[`queue`] | Return a reference to the modifiable underlying `bdlc::Queue` object. | xref:BloombergLP/bdlcc/Queue/removeAll-08.adoc[`removeAll`] | `removeAll` overloads | xref:BloombergLP/bdlcc/Queue/timedPopBack.adoc[`timedPopBack`] | Remove the last item into `buffer`, waiting until `timeout` if empty. | xref:BloombergLP/bdlcc/Queue/timedPopFront.adoc[`timedPopFront`] | Remove the first item into `buffer`, waiting until `timeout` if empty. | xref:BloombergLP/bdlcc/Queue/timedPushBack.adoc[`timedPushBack`] | Append `item` to the back, waiting until `timeout` if the queue is full. | xref:BloombergLP/bdlcc/Queue/timedPushFront.adoc[`timedPushFront`] | Append `item` to the front, waiting until `timeout` if the queue is full. | xref:BloombergLP/bdlcc/Queue/tryPopBack-05.adoc[`tryPopBack`] | `tryPopBack` overloads | xref:BloombergLP/bdlcc/Queue/tryPopFront-039.adoc[`tryPopFront`] | `tryPopFront` overloads | xref:BloombergLP/bdlcc/Queue/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<Queue, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#