[#BloombergLP-bdlmt-MultipriorityThreadPool-2constructor-0b] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/MultipriorityThreadPool.adoc[MultipriorityThreadPool]::MultipriorityThreadPool :relfileprefix: ../../../ :mrdocs: Create a multi‐priority thread pool with the given size and priorities. == Synopsis Declared in `<bdlmt_multiprioritythreadpool.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- MultipriorityThreadPool( int numThreads, int numPriorities, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- == Description Create a multi‐priority thread pool capable of concurrently executing the specified `numThreads` "jobs" with associated integer priorities in the specified range `[0 .. numPriorities ‐ 1]`, 0 being the most urgent. 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. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. The newly created thread pool will initially be enabled for enqueuing jobs, but with no worker threads created. The behavior is undefined unless `1 <= numThreads` and `1 <= numPriorities <= k_MAX_NUM_PRIORITIES`. == Parameters [cols="1,4"] |=== | Name| Description | *numThreads* | number of worker threads to create when started | *numPriorities* | number of distinct job priority levels | *basicAllocator* | memory allocator; null uses the default |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#