|
lintel 0.2.0
|
#include <ExecutorService.h>
Public Member Functions | |
| ExecutorService () | |
| ~ExecutorService () | |
| template<class F , class... Args> | |
| std::future< typename std::invoke_result< typename std::decay< F >::type, typename std::decay< Args >::type... >::type > | execute (F &&f, Args &&...args) |
A simple thread pool executor that queues and executes tasks asynchronously.
|
inline |
Constructor; starts the worker thread.
|
inline |
Destructor; signals exit and joins the worker thread.
| std::future< typename std::invoke_result< typename std::decay< F >::type, typename std::decay< Args >::type... >::type > lintel::ExecutorService::execute | ( | F && | f, |
| Args &&... | args | ||
| ) |
Enqueue a callable for asynchronous execution.
| F | callable type |
| Args | argument types |
| f | callable to execute |
| args | arguments to pass to the callable |