[#BloombergLP-bdlmt-MultipriorityThreadPool-2constructor-0a]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/MultipriorityThreadPool.adoc[MultipriorityThreadPool]::MultipriorityThreadPool
:relfileprefix: ../../../
:mrdocs:

Create a multi&hyphen;priority thread pool capable of concurrently executing the specified `numThreads` &quot;jobs&quot; with associated integer priorities in the specified range `&lsqb;0 &period;&period; numPriorities &hyphen; 1&rsqb;`, 0 being the most urgent&period; Optionally specify `threadAttributes` used to customize each worker thread created by this thread pool, in which case the attribute pertaining to whether the worker threads are created in the detached state is ignored&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The newly created thread pool will initially be enabled for enqueuing jobs, but with no worker threads created&period; The behavior is undefined unless `1 &lt;&equals; numThreads` and `1 &lt;&equals; numPriorities &lt;&equals; k&lowbar;MAX&lowbar;NUM&lowbar;PRIORITIES`&period;

== Synopses

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

Create a multi&hyphen;priority thread pool capable of concurrently executing the specified `numThreads` &quot;jobs&quot; with associated integer priorities in the specified range `&lsqb;0 &period;&period; numPriorities &hyphen; 1&rsqb;`, 0 being the most urgent&period; Optionally specify `threadAttributes` used to customize each worker thread created by this thread pool, in which case the attribute pertaining to whether the worker threads are created in the detached state is ignored&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The newly created thread pool will initially be enabled for enqueuing jobs, but with no worker threads created&period; The behavior is undefined unless `1 &lt;&equals; numThreads` and `1 &lt;&equals; numPriorities &lt;&equals; k&lowbar;MAX&lowbar;NUM&lowbar;PRIORITIES`&period;


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

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


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

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


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