This class implements a thread pool used for concurrently executing multiple user‐defined functions ("jobs").
Synopsis
Declared in <bdlmt_threadpool.h>
class ThreadPool;
Type Aliases
Name |
Description |
Callable type representing a job to be executed by the thread pool. |
Member Functions
Name |
Description |
|
Constructors |
|
Call |
Disable queuing on this thread pool and wait until all pending jobs complete. Use |
|
Return the state (enabled or not) of the thread pool. |
|
|
|
Return the amount of time (in milliseconds) a thread remains idle before being shut down when there are more than min threads started. |
|
Return the amount of time a thread remains idle before being shut down when there are more than min threads started. |
|
Return the maximum number of threads that are allowed to be running at given time. |
|
Return the minimum number of threads that must be started at any given time. |
|
Return the number of threads that are currently processing a job. |
|
Return the number of jobs that are currently queued, but not yet being processed. |
|
Return the number of threads that are currently waiting for a job. |
|
Return the percentage of wall time spent executing jobs. |
|
Report thread‐pool busy percentage since last reset. |
|
Disable queuing on this thread pool, cancel all queued jobs, and shut down all processing threads (after all active jobs complete). |
|
Enable queuing and start processing threads. |
|
Disable queuing on this thread pool and wait until all pending jobs complete, then shut down all processing threads. |
|
Return the number of times that thread creation failed. |
|
|
Declare that this type uses a |
Friends
Name |
Description |
Entry point for processing threads. |
Created with MrDocs