29 template <
class Function,
class... Args>
30 [[nodiscard]] std::future<std::invoke_result_t<std::decay_t<Function>, std::decay_t<Args>...>>
31 async(Function && f, Args &&... args);
39 template <
class Function,
class... Args>
40 [[nodiscard]] std::future<std::invoke_result_t<std::decay_t<Function>, std::decay_t<Args>...>>
48 std::vector<T>
joinall(std::vector<std::future<T>> & fvec,
bool multiline =
true);
54 void joinall(std::vector<std::future<void>> & fvec,
bool multiline =
true);
59#include <jevois/Util/details/AsyncImpl.H>
std::vector< T > joinall(std::vector< std::future< T > > &fvec, bool multiline=true)
Collect results from several async threads that are all returning a T result.
std::future< std::invoke_result_t< std::decay_t< Function >, std::decay_t< Args >... > > async(Function &&f, Args &&... args)
Async execution using a thread pool.
std::future< std::invoke_result_t< std::decay_t< Function >, std::decay_t< Args >... > > async_little(Function &&f, Args &&... args)
Async execution using a thread pool.
Main namespace for all JeVois classes and functions.