[#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`. == Synopsis Declared in `<bdlmt_multiqueuethreadpool.h>` [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‐negative integer, or ‐1 if `id` does not specify a valid queue. == Return Value number of elements in the queue, or ‐1 if `id` is invalid == Parameters [cols="1,4"] |=== | Name| Description | *id* | queue identifier |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#