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

Delete the queue with the specified `id`, running `cleanupFunctor` last&period;

== Synopsis

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

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

== Description

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;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *id*
| queue identifier
| *cleanupFunctor*
| functor invoked immediately before queue deletion
|===


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