◆ ThreadPool()
Constructs a thread pool with the specified number of threads.
- Parameters
-
num_threads | Number of threads to spawn. If zero, spawns the maximum number of concurrent threads supported by the hardware. |
◆ ~ThreadPool()
Terminates the thread pool and joins the threads.
◆ Submit()
Submits a job to the thread pool.
- Parameters
-
- Returns
- Future value returned by the job.
◆ Terminate()
Terminates the thread pool.
Jobs that have not yet been initiated will return a future exception.
The documentation for this class was generated from the following file:
- /home/runner/work/ctrl-utils/ctrl-utils/include/ctrl_utils/thread_pool.h