Portable concurrency  0.11.0
Classes | Functions | Variables
<portable_concurrency/execution>

Set of primitives to establish future API interaction with user provided executor types. More...

Classes

struct  is_executor< E >
 Trait which can be specialized for user provided types to enable using them as executors. More...
 
struct  inplace_executor_t
 Trivial executor which evaluates task immediattely in the invocation thread. More...
 

Functions

template<typename Executor , typename Functor >
void post (Executor exec, Functor func)
 

Variables

constexpr inplace_executor_t inplace_executor
 Global instance of trivial inplace executor type. More...
 

Detailed Description

Set of primitives to establish future API interaction with user provided executor types.

Function Documentation

◆ post()

void post ( Executor  exec,
Functor  func 
)

Function which must be ADL discoverable for user provided executor classes. This function must schedule execution of the function object from the second argument on the executor provided with the first argument.

Function object type meets MoveConstructable, MoveAssignable and Callable (with signature void()) standard library named requirements.

See also
portable_concurrency::is_executor

Variable Documentation

◆ inplace_executor

constexpr inplace_executor_t inplace_executor
constexpr

Global instance of trivial inplace executor type.

See also
inplace_executor