[#BloombergLP-bdlmt-MultiQueueThreadPool_Queue-initiatePause]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/MultiQueueThreadPool_Queue.adoc[MultiQueueThreadPool&lowbar;Queue]::initiatePause
:relfileprefix: ../../../
:mrdocs:

Begin pausing this queue without waiting for the current job&period;

== Synopsis

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

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

== Description

Initiate the pausing of this queue, prevent jobs from being executed on this queue (excluding the currently&hyphen;executing job &hyphen; or batch of jobs &hyphen; if there is one), and prevent the queue from being deleted&period; Return 0 on success, and a non&hyphen;zero value if the queue is already paused or is being paused or deleted by another thread&period; The behavior is undefined unless, after a successful invocation of `initiatePause`, `waitWhilePausing` is invoked (to complete the pause operation and allow the queue to, potentially, be deleted)&period;

== Return Value

0 on success, and a non&hyphen;zero value if the queue is already paused or is being paused or deleted by another thread


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