34 Execution control library [exec]

34.1 General [exec.general]

This Clause describes components supporting execution of function objects ([function.objects]).
The following subclauses describe the requirements, concepts, and components for execution control primitives as summarized in Table 151.
Table 151: Execution control library summary [tab:exec.summary]
Subclause
Header
Schedulers
<execution>
Receivers
Operation states
Senders
Table 152 shows the types of customization point objects ([customization.point.object]) used in the execution control library.
Table 152: Types of customization point objects in the execution control library [tab:exec.pos]
Customization point
Purpose
Examples
object type
core
provide core execution functionality, and connection between core components
e.g., connect, start
completion functions
called by senders to announce the completion of the work (success, error, or cancellation)
senders
allow the specialization of the provided sender algorithms
queries
allow querying different properties of objects
This clause makes use of the following exposition-only entities.
For a subexpression expr, let MANDATE-NOTHROW(expr) be expression-equivalent to expr.
Mandates: noexcept(expr) is true.
namespace std { template<class T> concept movable-value = // exposition only move_constructible<decay_t<T>> && constructible_from<decay_t<T>, T> && (!is_array_v<remove_reference_t<T>>); }
For function types F1 and F2 denoting R1(Args1...) and R2(Args2...), respectively, MATCHING-SIG(F1, F2) is true if and only if same_as<R1(Args1&&...), R2(Args2&&...)> is true.
For a subexpression err, let Err be decltype((err)) and let AS-EXCEPT-PTR(err) be:
  • err if decay_t<Err> denotes the type exception_ptr.
    Mandates: err != exception_ptr() is true.
  • Otherwise, make_exception_ptr(system_error(err)) if decay_t<Err> denotes the type error_code.
  • Otherwise, make_exception_ptr(err).