[#BloombergLP-bdlmt-MultiQueueThreadPool-numElements-0e]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/MultiQueueThreadPool.adoc[MultiQueueThreadPool]::numElements
:relfileprefix: ../../../
:mrdocs:

Return the number of elements in the queue with the specified `id`&period;

== Synopsis

Declared in `&lt;bdlmt&lowbar;multiqueuethreadpool&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
numElements(int id) const;
----

== Description

Return an instantaneous snapshot of the number of elements enqueued in the queue associated with the specified `id` as a non&hyphen;negative integer, or &hyphen;1 if `id` does not specify a valid queue&period;

== Return Value

number of elements in the queue, or &hyphen;1 if `id` is invalid

== Parameters

[cols="1,4"]
|===
| Name| Description
| *id*
| queue identifier
|===


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