[#BloombergLP-bdlmt-FixedThreadPool-2constructor-03] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/FixedThreadPool.adoc[FixedThreadPool]::FixedThreadPool :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<bdlmt_fixedthreadpool.h>` Construct a thread pool with the specified `numThreads` number of threads and a job queue of capacity sufficient to enqueue the specified `maxNumPendingJobs` without blocking. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. The name used for created threads is "bdl.FixedPool". The behavior is undefined unless `1 <= numThreads`. Note that the actual job queue capacity can be obtained using `queueCapacity`, and may be more than `maxNumPendingJobs`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-00.adoc[FixedThreadPool]( int numThreads, int maxNumPendingJobs, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-00.adoc[_» more..._]# Construct a thread pool with the specified `threadAttributes`, `numThreads` number of threads, and a job queue with capacity sufficient to enqueue the specified `maxNumPendingJobs` without blocking. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. The name used for created threads is `threadAttributes.threadName()` if not empty, otherwise "bdl.FixedPool". The detached state of `threadAttributes` is ignored, and `e_CREATE_JOINABLE` is used in all cases. The behavior is undefined unless `1 <= numThreads`. Note that the actual job queue capacity can be obtained using `queueCapacity`, and may be more than `maxNumPendingJobs`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-0d.adoc[FixedThreadPool]( xref:BloombergLP/bslmt/ThreadAttributes.adoc[bslmt::ThreadAttributes] const& threadAttributes, int numThreads, int maxNumPendingJobs, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-0d.adoc[_» more..._]# Construct a thread pool with the specified `numThreads` number of threads, a job queue of capacity sufficient to enqueue the specified `maxNumPendingJobs` without blocking, the specified `threadPoolName` to be used to identify this thread pool, and the specified `metricsRegistry` to be used for reporting metrics. If `metricsRegistry` is 0, `bdlm::MetricsRegistry::singleton()` is used. Optionally specify a'basicAllocator' used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. The name used for created threads is `threadPoolName` if not empty, otherwise "bdl.FixedPool". The behavior is undefined unless `1 <= numThreads`. Note that the actual job queue capacity can be obtained using `queueCapacity`, and may be more than `maxNumPendingJobs`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-06.adoc[FixedThreadPool]( int numThreads, int maxNumPendingJobs, std::string_view const& threadPoolName, xref:BloombergLP/bdlm/MetricsRegistry.adoc[bdlm::MetricsRegistry]* metricsRegistry, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-06.adoc[_» more..._]# Construct a thread pool with the specified `threadAttributes`, `numThreads` number of threads, a job queue with capacity sufficient to enqueue the specified `maxNumPendingJobs` without blocking, the specified `threadPoolName` to be used to identify this thread pool, and the specified `metricsRegistry` to be used for reporting metrics. If `metricsRegistry` is 0, `bdlm::MetricsRegistry::singleton()` is used. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. The name used for created threads is `threadAttributes.threadName()` if not empty, otherwise `threadPoolName` if not empty, otherwise "bdl.FixedPool". The detached state of `threadAttributes` is ignored, and `e_CREATE_JOINABLE` is used in all cases. The behavior is undefined unless `1 <= numThreads`. Note that the actual job queue capacity can be obtained using `queueCapacity`, and may be more than `maxNumPendingJobs`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-07.adoc[FixedThreadPool]( xref:BloombergLP/bslmt/ThreadAttributes.adoc[bslmt::ThreadAttributes] const& threadAttributes, int numThreads, int maxNumPendingJobs, std::string_view const& threadPoolName, xref:BloombergLP/bdlm/MetricsRegistry.adoc[bdlm::MetricsRegistry]* metricsRegistry, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlmt/FixedThreadPool/2constructor-07.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#