[#BloombergLP-bdlmt-FixedThreadPool] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::FixedThreadPool :relfileprefix: ../../ :mrdocs: This class implements a thread pool used for concurrently executing multiple user‐defined functions ("jobs"). == Synopsis Declared in `<bdlmt_fixedthreadpool.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class FixedThreadPool; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlmt/FixedThreadPool/Job.adoc[`Job`] | Defines a type alias for the job functor type. | xref:BloombergLP/bdlmt/FixedThreadPool/Queue.adoc[`Queue`] | Defines a type alias for the bounded job queue type. |=== == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlmt/FixedThreadPool/_04enum-0c.adoc[`Unnamed enum`] | Status codes returned by queue operations. | xref:BloombergLP/bdlmt/FixedThreadPool/_04enum-08.adoc[`Unnamed enum`] | Thread‐pool operational states. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-03.adoc[`FixedThreadPool`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlmt/FixedThreadPool/2destructor.adoc[`~FixedThreadPool`] [.small]#[destructor]# | Remove all pending jobs from the queue without executing them, block until all currently running jobs complete, and then destroy this thread pool. | xref:BloombergLP/bdlmt/FixedThreadPool/disable.adoc[`disable`] | Disable enqueueing into this pool. | xref:BloombergLP/bdlmt/FixedThreadPool/drain.adoc[`drain`] | Drain queued and executing jobs without disabling this pool. | xref:BloombergLP/bdlmt/FixedThreadPool/enable.adoc[`enable`] | Enable queuing into this pool. If the queue is not enqueue disabled, this call has no effect. | xref:BloombergLP/bdlmt/FixedThreadPool/enqueueJob-04.adoc[`enqueueJob`] | `enqueueJob` overloads | xref:BloombergLP/bdlmt/FixedThreadPool/isEnabled.adoc[`isEnabled`] | Return `true` if enqueuing jobs is enabled on this thread pool, and `false` otherwise. | xref:BloombergLP/bdlmt/FixedThreadPool/isStarted.adoc[`isStarted`] | Return `true` if `numThreads()` are started on this threadpool and `false` otherwise (indicating that 0 threads are started on this thread pool.) | xref:BloombergLP/bdlmt/FixedThreadPool/numActiveThreads.adoc[`numActiveThreads`] | Return a snapshot of the number of threads that are currently processing a job for this threadpool. | xref:BloombergLP/bdlmt/FixedThreadPool/numPendingJobs.adoc[`numPendingJobs`] | Return a snapshot of the number of jobs currently enqueued to be processed by thread pool. | xref:BloombergLP/bdlmt/FixedThreadPool/numThreads.adoc[`numThreads`] | Return the number of threads passed to this thread pool at construction. | xref:BloombergLP/bdlmt/FixedThreadPool/numThreadsStarted.adoc[`numThreadsStarted`] | Return a snapshot of the number of threads currently started by this thread pool. | xref:BloombergLP/bdlmt/FixedThreadPool/queueCapacity.adoc[`queueCapacity`] | Return the capacity of the queue used to enqueue jobs by this thread pool. | xref:BloombergLP/bdlmt/FixedThreadPool/shutdown.adoc[`shutdown`] | Shut down this thread pool. | xref:BloombergLP/bdlmt/FixedThreadPool/start.adoc[`start`] | Spawn processing threads and enable enqueuing. | xref:BloombergLP/bdlmt/FixedThreadPool/stop.adoc[`stop`] | Disable enqueuing, wait for jobs to complete, and join worker threads. | xref:BloombergLP/bdlmt/FixedThreadPool/tryEnqueueJob-0d.adoc[`tryEnqueueJob`] | `tryEnqueueJob` overloads |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#