[#BloombergLP-bdlmt-MultiQueueThreadPool-drainQueue] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/MultiQueueThreadPool.adoc[MultiQueueThreadPool]::drainQueue :relfileprefix: ../../../ :mrdocs: Wait until all jobs in the queue indicated by the specified `id` are finished. This method simply waits until that queue is empty, without disabling the queue; it may thus wait indefinitely if more jobs are being added. The queue may be enabled or disabled when this method is called. Return 0 on success, and a non‐zero value if the specified queue does not exist or is deleted while this method is waiting. Note that this method waits by repeatedly yielding. == Synopsis Declared in `<bdlmt_multiqueuethreadpool.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int drainQueue(int id); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#