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

Constructors

== Synopses

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

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


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

[.small]#xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-00.adoc[_» more&period;&period;&period;_]#

Construct a thread pool with the specified `threadAttributes`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-0d.adoc[FixedThreadPool](
    xref:BloombergLP/bslmt/ThreadAttributes.adoc[bslmt::ThreadAttributes] const& threadAttributes,
    int numThreads,
    int maxNumPendingJobs,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-0d.adoc[_» more&period;&period;&period;_]#

Construct a thread pool with the specified `threadPoolName`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-06.adoc[FixedThreadPool](
    int numThreads,
    int maxNumPendingJobs,
    std::string&lowbar;view const& threadPoolName,
    xref:BloombergLP/bdlm/MetricsRegistry.adoc[bdlm::MetricsRegistry]* metricsRegistry,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-06.adoc[_» more&period;&period;&period;_]#

Construct a thread pool with `threadAttributes` and `threadPoolName`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-07.adoc[FixedThreadPool](
    xref:BloombergLP/bslmt/ThreadAttributes.adoc[bslmt::ThreadAttributes] const& threadAttributes,
    int numThreads,
    int maxNumPendingJobs,
    std::string&lowbar;view const& threadPoolName,
    xref:BloombergLP/bdlm/MetricsRegistry.adoc[bdlm::MetricsRegistry]* metricsRegistry,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-07.adoc[_» more&period;&period;&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
| *threadAttributes*
| attributes used when creating worker threads
| *threadPoolName*
| name identifying this thread pool
| *metricsRegistry*
| metrics registry, or singleton if 0
|===


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