[#BloombergLP-bdlcc-Queue]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::Queue
:relfileprefix: ../../
:mrdocs:

This class provides a thread&hyphen;enabled, double&hyphen;ended queue of `TYPE` values&period;

== Synopsis

Declared in `&lt;bdlcc&lowbar;queue&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
class Queue;
----

== Description

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

== Types

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/Queue/InitialCapacity.adoc[`InitialCapacity`] 
| Enable uniform use of an optional integral initial&hyphen;capacity argument&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/Queue/2constructor-07.adoc[`Queue`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlcc/Queue/2destructor.adoc[`&#126;Queue`] [.small]#[destructor]#
| Destroy this container&period; The behavior is undefined unless all access or modification of the container has completed prior to this call&period;
| 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&period;
| xref:BloombergLP/bdlcc/Queue/forcePushFront.adoc[`forcePushFront`] 
| Append `item` to the front, ignoring the high&hyphen;water mark&period;
| xref:BloombergLP/bdlcc/Queue/highWaterMark.adoc[`highWaterMark`] 
| Return the high&hyphen;water mark value for this queue&period;
| xref:BloombergLP/bdlcc/Queue/insertCondition.adoc[`insertCondition`] 
| Return a reference to the condition signaling that the queue is not full&period;
| xref:BloombergLP/bdlcc/Queue/length.adoc[`length`] 
| Return the number of elements in this queue&period; Note that if other threads are manipulating the queue, this information may be obsolete by the time it is returned&period;
| 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&colon;&colon;Queue` object&period;
| xref:BloombergLP/bdlcc/Queue/notEmptyCondition.adoc[`notEmptyCondition`] 
| Return the condition variable used by this queue to signal that the queue is not empty&period;
| xref:BloombergLP/bdlcc/Queue/notFullCondition.adoc[`notFullCondition`] 
| Return the condition used to signal that this queue is not full&period;
| 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&period;
| xref:BloombergLP/bdlcc/Queue/pushFront.adoc[`pushFront`] 
| Append `item` to the front of this queue&period;
| xref:BloombergLP/bdlcc/Queue/queue.adoc[`queue`] 
| Return a reference to the modifiable underlying `bdlc&colon;&colon;Queue` object&period;
| 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&period;
| xref:BloombergLP/bdlcc/Queue/timedPopFront.adoc[`timedPopFront`] 
| Remove the first item into `buffer`, waiting until `timeout` if empty&period;
| xref:BloombergLP/bdlcc/Queue/timedPushBack.adoc[`timedPushBack`] 
| Append `item` to the back, waiting until `timeout` if the queue is full&period;
| xref:BloombergLP/bdlcc/Queue/timedPushFront.adoc[`timedPushFront`] 
| Append `item` to the front, waiting until `timeout` if the queue is full&period;
| 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&lt;Queue, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
