[#BloombergLP-bdlmt-MultiQueueThreadPool-drain]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/MultiQueueThreadPool.adoc[MultiQueueThreadPool]::drain
:relfileprefix: ../../../
:mrdocs:

Wait until all non&hyphen;paused queues are empty&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
drain();
----

== Description

Wait until all queues are empty&period; This method waits until all non&hyphen;paused queues are empty without disabling the queues (and may thus wait indefinitely)&period; The queues and&sol;or the thread pool may be either enabled or disabled when this method is called&period; This method may be called on a stopped or started thread pool&period; Note that `drain` does not attempt to delete queues directly&period; However, as a side&hyphen;effect of emptying all queues, any queue for which `deleteQueue` was called previously will be deleted before `drain` returns&period; Note also that this method waits by repeatedly yielding&period;


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