[#BloombergLP-bdlmt-FixedThreadPool-2constructor-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/FixedThreadPool.adoc[FixedThreadPool]::FixedThreadPool
:relfileprefix: ../../../
:mrdocs:

Construct a fixed&hyphen;size thread pool&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
FixedThreadPool(
    int numThreads,
    int maxNumPendingJobs,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

== Description

Construct a thread pool with the specified `numThreads` number of threads and a job queue of capacity sufficient to enqueue the specified `maxNumPendingJobs` without blocking&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The name used for created threads is &quot;bdl&period;FixedPool&quot;&period; The behavior is undefined unless `1 &lt;&equals; numThreads`&period; Note that the actual job queue capacity can be obtained using `queueCapacity`, and may be more than `maxNumPendingJobs`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *numThreads*
| number of processing threads
| *maxNumPendingJobs*
| capacity of the pending&hyphen;job queue
| *basicAllocator*
| memory allocator&semi; null uses the default
|===


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