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

Return the number of elements contained in this container&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlcc/Deque/size_type.adoc[Deque&lt;TYPE&gt;::size&lowbar;type]
length() const;
----

== Description

Note that this method temporarily acquires the mutex, so that this method must not be called while a proctor in the same thread has this container locked, and the value returned is potentially obsolete before it is returned if any other threads are simultaneously modifying this container&period; To find the length while a proctor has the container locked, call `proctor&hyphen;&gt;size()`&period;

== Return Value

the number of elements in this container


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