Constructors
Synopses
Declared in <bdlmt_fixedthreadpool.h>
Construct a fixed‐size thread pool.
FixedThreadPool(
int numThreads,
int maxNumPendingJobs,
bslma::Allocator* basicAllocator = 0);
Construct a thread pool with the specified threadAttributes.
FixedThreadPool(
bslmt::ThreadAttributes const& threadAttributes,
int numThreads,
int maxNumPendingJobs,
bslma::Allocator* basicAllocator = 0);
Construct a thread pool with the specified threadPoolName.
FixedThreadPool(
int numThreads,
int maxNumPendingJobs,
std::string_view const& threadPoolName,
bdlm::MetricsRegistry* metricsRegistry,
bslma::Allocator* basicAllocator = 0);
Construct a thread pool with threadAttributes and threadPoolName.
FixedThreadPool(
bslmt::ThreadAttributes const& threadAttributes,
int numThreads,
int maxNumPendingJobs,
std::string_view const& threadPoolName,
bdlm::MetricsRegistry* metricsRegistry,
bslma::Allocator* basicAllocator = 0);
Parameters
Name |
Description |
numThreads |
number of processing threads |
maxNumPendingJobs |
capacity of the pending‐job queue |
basicAllocator |
memory allocator; null uses the default |
threadAttributes |
attributes used when creating worker threads |
threadPoolName |
name identifying this thread pool |
metricsRegistry |
metrics registry, or singleton if 0 |
Created with MrDocs