Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
kcenon::common::concepts::AsyncCallable Concept Referenceexport

A callable suitable for async execution returning a future. More...

#include <callable.h>

Concept definition

template<typename F, typename R>
std::same_as<std::invoke_result_t<F>, R>
A callable suitable for async execution returning a future.
Definition callable.h:256
A callable type that can be invoked with given arguments.
Definition callable.h:62

Detailed Description

A callable suitable for async execution returning a future.

Example usage:

template<AsyncCallable<int> F>
std::future<int> run_async(F&& func) {
return std::async(std::launch::async, std::forward<F>(func));
}

Definition at line 256 of file callable.h.