Executor that implements a centralized task queue with a simple execution strategy.
More...
#include <simple_threadpool.hpp>
template<typename Closure>
class tf::SimpleThreadpool< Closure >
Executor that implements a centralized task queue with a simple execution strategy.
- Template Parameters
-
◆ SimpleThreadpool()
template<typename Closure >
constructs the executor with a given number of worker threads
- Parameters
-
N | the number of worker threads |
◆ ~SimpleThreadpool()
template<typename Closure >
destructs the executor
Destructing the executor immediately forces all worker threads to stop. The executor does not guarantee all tasks to finish upon destruction.
◆ batch()
template<typename Closure >
moves a batch of closures to the executor
- Parameters
-
closures | a vector of closures to move |
◆ emplace()
template<typename Closure >
template<typename... ArgsT>
constructs the closure in place in the executor
- Template Parameters
-
ArgsT... | argument parameter pack |
- Parameters
-
args... | arguments to forward to the constructor of the closure |
The documentation for this class was generated from the following file: