[#BloombergLP-bdlmt-MultiQueueThreadPool] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::MultiQueueThreadPool :relfileprefix: ../../ :mrdocs: This class implements a dynamic, configurable pool of queues, each of which is processed serially by a thread pool. == Synopsis Declared in `<bdlmt_multiqueuethreadpool.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class MultiQueueThreadPool; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlmt/MultiQueueThreadPool/CleanupFunctor.adoc[`CleanupFunctor`] | Defines a type alias for the queue cleanup functor type. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/Job.adoc[`Job`] | Defines a type alias for the job functor type. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/QueueRegistry.adoc[`QueueRegistry`] | Defines a type alias for the registry mapping queue IDs to queues. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlmt/MultiQueueThreadPool/2constructor-01.adoc[`MultiQueueThreadPool`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlmt/MultiQueueThreadPool/2destructor.adoc[`~MultiQueueThreadPool`] [.small]#[destructor]# | Destroy this multi‐queue thread pool. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/addJobAtFront-0b.adoc[`addJobAtFront`] | `addJobAtFront` overloads | xref:BloombergLP/bdlmt/MultiQueueThreadPool/batchSize.adoc[`batchSize`] | Return the batch size of queue `id`, or ‐1 if invalid. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/createQueue.adoc[`createQueue`] | Create a new queue and return its non‐zero identifier. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/deleteQueue-04.adoc[`deleteQueue`] | `deleteQueue` overloads | xref:BloombergLP/bdlmt/MultiQueueThreadPool/disableQueue.adoc[`disableQueue`] | Disable enqueuing to the queue associated with the specified `id`. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/drain.adoc[`drain`] | Wait until all non‐paused queues are empty. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/drainQueue.adoc[`drainQueue`] | Wait until all jobs in the queue with the specified `id` finish. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/enableQueue.adoc[`enableQueue`] | Enable enqueuing to the queue associated with the specified `id`. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/enqueueJob-0b.adoc[`enqueueJob`] | `enqueueJob` overloads | xref:BloombergLP/bdlmt/MultiQueueThreadPool/isEnabled.adoc[`isEnabled`] | Return `true` if the queue associated with the specified `id` is currently enabled, or `false` otherwise (including if `id` is not a valid queue id). | xref:BloombergLP/bdlmt/MultiQueueThreadPool/isPaused.adoc[`isPaused`] | Return `true` if the queue associated with the specified `id` is currently paused, or `false` otherwise (including if `id` is not a valid queue id). | xref:BloombergLP/bdlmt/MultiQueueThreadPool/numElements-0f.adoc[`numElements`] | `numElements` overloads | xref:BloombergLP/bdlmt/MultiQueueThreadPool/numProcessed.adoc[`numProcessed`] | Load processed item counts into the output parameters. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/numProcessedReset.adoc[`numProcessedReset`] | Reset and return processed/enqueued/deleted counts. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/numQueues.adoc[`numQueues`] | Return an instantaneous snapshot of the number of queues managed by this object. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/pauseQueue.adoc[`pauseQueue`] | Pause the queue with the specified `id` after the current job finishes. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/resumeQueue.adoc[`resumeQueue`] | Allow jobs on the queue with the specified `id` to begin executing. Return 0 on success, and a non‐zero value if the queue does not exist or is not paused. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/setBatchSize.adoc[`setBatchSize`] | Set the job execution batch size for the queue with the specified `id`. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/shutdown.adoc[`shutdown`] | Disable queuing, delete all queues, and shut down the owned pool. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/start.adoc[`start`] | Start queuing and the owned thread pool. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/stop.adoc[`stop`] | Disable queuing and stop the owned thread pool once queues drain. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/threadPool.adoc[`threadPool`] | Return a reference to the non‐modifiable thread pool owned by this object. | xref:BloombergLP/bdlmt/MultiQueueThreadPool/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<MultiQueueThreadPool, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bdlmt/MultiQueueThreadPool_Queue.adoc[BloombergLP::bdlmt::MultiQueueThreadPool_Queue]` | This private class provides a thread‐safe, lightweight job queue. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#