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

Pause the queue with the specified `id` after the current job finishes&period;

== Synopsis

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

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

== Description

Wait until any currently&hyphen;executing job (or batch of jobs) on the queue with the specified `id` completes, then prevent any more jobs from being executed on that queue&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; Note that this method may be invoked from a job executing on the given queue, in which case this method does not wait&period; Note also that this method differs from `disableQueue` in that (1) `pauseQueue` stops processing for a queue, and (2) does _not_ prevent additional jobs from being enqueued&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

== Parameters

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


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