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.

Synopsis

Declared in <bdlmt_multiprioritythreadpool.h>

MultipriorityThreadPool(
    int numThreads,
    int numPriorities,
    bslma::Allocator* basicAllocator = 0);

Created with MrDocs