This class implements a thread pool used for concurrently executing multiple user‐defined functions ("jobs").
Synopsis
Declared in <bdlmt_fixedthreadpool.h>
class FixedThreadPool;
Type Aliases
Enums
Name |
Description |
Status codes returned by queue operations. |
|
Thread‐pool operational states. |
Member Functions
Name |
Description |
|
Constructors |
|
Remove all pending jobs from the queue without executing them, block until all currently running jobs complete, and then destroy this thread pool. |
Disable enqueueing into this pool. |
|
Drain queued and executing jobs without disabling this pool. |
|
Enable queuing into this pool. If the queue is not enqueue disabled, this call has no effect. |
|
|
|
Return |
|
Return |
|
Return a snapshot of the number of threads that are currently processing a job for this threadpool. |
|
Return a snapshot of the number of jobs currently enqueued to be processed by thread pool. |
|
Return the number of threads passed to this thread pool at construction. |
|
Return a snapshot of the number of threads currently started by this thread pool. |
|
Return the capacity of the queue used to enqueue jobs by this thread pool. |
|
Shut down this thread pool. |
|
Spawn processing threads and enable enqueuing. |
|
Disable enqueuing, wait for jobs to complete, and join worker threads. |
|
|
Created with MrDocs