BloombergLP::bdlmt::FixedThreadPool::FixedThreadPool

Constructors

Synopses

Declared in <bdlmt_fixedthreadpool.h>

Construct a fixed-size thread pool.

FixedThreadPool(
    int numThreads,
    int maxNumPendingJobs,
    bslma::Allocator* basicAllocator = 0);
» more...

Construct a thread pool with the specified threadAttributes.

FixedThreadPool(
    bslmt::ThreadAttributes const& threadAttributes,
    int numThreads,
    int maxNumPendingJobs,
    bslma::Allocator* basicAllocator = 0);
» more...

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);
» more...

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);
» more...

Parameters

NameDescription
numThreadsnumber of processing threads
maxNumPendingJobscapacity of the pending-job queue
basicAllocatormemory allocator; null uses the default
threadAttributesattributes used when creating worker threads
threadPoolNamename identifying this thread pool
metricsRegistrymetrics registry, or singleton if 0