openGPMP
Open Source Mathematics Package
|
A class that provides a function to dispatch a function call to a thread pool and return a future object for obtaining the result. More...
#include <threads.hpp>
Public Member Functions | |
template<typename Function , typename... Args> | |
auto | dispatch (ThreadPool &pool, Function &&func, Args &&...args) -> std::future< typename std::invoke_result< Function, Args... >::type > |
Dispatches a function call to a ThreadPool and returns a future object for obtaining the result. More... | |
A class that provides a function to dispatch a function call to a thread pool and return a future object for obtaining the result.
Definition at line 204 of file threads.hpp.
|
inline |
Dispatches a function call to a ThreadPool and returns a future object for obtaining the result.
Function | The type of the function to be dispatched. |
Args | The types of the arguments to be passed to the function. |
pool | The ThreadPool object to which the function call is dispatched. |
func | The function to be dispatched. |
args | The arguments to be passed to the function. |
Definition at line 220 of file threads.hpp.