The DynamicThreadPool allows creating multiple threads which are garbage collected.
More...
#include <dynamicThreadPool.hpp>
The DynamicThreadPool allows creating multiple threads which are garbage collected.
If the DynamicThreadPool is destroyed the remaining threads will be joined.
- Thread Safety
- thread-safe
◆ DynamicThreadPool() [1/3]
| rtctk::componentFramework::DynamicThreadPool::DynamicThreadPool |
( |
std::string | name, |
|
|
numapp::NumaPolicies | policies = {} ) |
|
inline |
Create a new DynamicThreadPool.
- Parameters
-
| name | function to call |
| args | arguments to the function |
◆ DynamicThreadPool() [2/3]
| rtctk::componentFramework::DynamicThreadPool::DynamicThreadPool |
( |
const DynamicThreadPool & | | ) |
|
|
delete |
◆ DynamicThreadPool() [3/3]
| rtctk::componentFramework::DynamicThreadPool::DynamicThreadPool |
( |
DynamicThreadPool && | | ) |
|
|
delete |
◆ ~DynamicThreadPool()
| rtctk::componentFramework::DynamicThreadPool::~DynamicThreadPool |
( |
| ) |
|
|
inline |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ Submit()
template<class Func, class... Args>
| void rtctk::componentFramework::DynamicThreadPool::Submit |
( |
Func && | func, |
|
|
Args &&... | args ) |
|
inline |
Execute a function in a new thread which gets joined when it finishes or when the pool is destroyed.
- Parameters
-
| func | function to call |
| args | arguments to the function |
The documentation for this class was generated from the following file: