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

`deleteQueue` overloads

== Synopses

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

Disable enqueuing to the queue associated with the specified `id`, and when the currently executing job (or batch of jobs) of that queue, if any, is complete, then destroy the queue&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; This function will fail if the pool is stopped&period; Any other (non&hyphen;executing) jobs on the queue are deleted asynchronously&period; The calling thread blocks until completion of the currently executing job (or batch of jobs), except when `deleteQueue` is called from a job in the queue being deleted&period; In that latter case, no block takes place, the queue is deleted (no longer observable from the `MultiQueueThreadPool`), and the job completes&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlmt/MultiQueueThreadPool/deleteQueue-0a.adoc[deleteQueue](int id);
----

[.small]#xref:BloombergLP/bdlmt/MultiQueueThreadPool/deleteQueue-0a.adoc[_» more&period;&period;&period;_]#

Disable enqueuing to the queue associated with the specified `id`, and enqueue the specified `cleanupFunctor` to the _front_ of the queue&period; The `cleanupFunctor` is guaranteed to be the last queue element processed, after which the queue is destroyed&period; This function does not wait for the `cleanupFunctor` to be executed (instead the caller is notified asynchronously through the execution of the supplied `cleanupFunctor`)&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; Note that this function will fail if this pool is stopped&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlmt/MultiQueueThreadPool/deleteQueue-01.adoc[deleteQueue](
    int id,
    xref:BloombergLP/bdlmt/MultiQueueThreadPool/CleanupFunctor.adoc[CleanupFunctor] const& cleanupFunctor);
----

[.small]#xref:BloombergLP/bdlmt/MultiQueueThreadPool/deleteQueue-01.adoc[_» more&period;&period;&period;_]#


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