transwarp
|
Executor for parallel execution. Uses a simple thread pool. More...
#include <transwarp.h>
Public Member Functions | |
parallel (const std::size_t n_threads, std::function< void(std::size_t thread_index)> on_thread_started=nullptr) | |
parallel (const parallel &)=delete | |
parallel & | operator= (const parallel &)=delete |
parallel (parallel &&)=delete | |
parallel & | operator= (parallel &&)=delete |
std::string | name () const override |
Returns the name of the executor. | |
void | execute (const std::function< void()> &functor, transwarp::itask &) override |
Pushes the functor into the thread pool for asynchronous execution. | |
Executor for parallel execution. Uses a simple thread pool.