6.6 KiB
[exec.general]
33 Execution control library [exec]
33.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 157.
Table 157 — Execution control library summary [tab:exec.summary]
| ð | Subclause | Header |
|---|---|---|
| ð [exec.sched] |
Schedulers | |
| ð [exec.recv] |
Receivers | |
| ð [exec.opstate] |
Operation states | |
| ð [exec.snd] |
Senders |
Table 158 shows the types of customization point objects ([customization.point.object]) used in the execution control library.
Table 158 — 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) | set_value, set_error, set_stopped |
| ð senders |
allow the specialization of the provided sender algorithms | sender factories (e.g., schedule, just, read_env)sender adaptors (e.g., continues_on, then, let_value)sender consumers (e.g., sync_wait) |
| ð queries |
allow querying different properties of objects | general queries (e.g., get_allocator, get_stop_token)environment queries (e.g., get_scheduler, get_delegation_scheduler)scheduler queries (e.g., get_forward_progress_guarantee)sender attribute queries (e.g., get_completion_scheduler) |
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 {templateconcept movable-value = // exposition onlymove_constructible<decay_t> &&constructible_from<decay_t, T> &&(!is_array_v<remove_reference_t>);}
For function types F1 and F2 denotingR1(Args1...) and R2(Args2...), respectively,MATCHING-SIG(F1, F2) is true if and only ifsame_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 denotes the type exception_ptr. Preconditions: !err is false.
-
Otherwise,make_exception_ptr(system_error(err)) if decay_t denotes the type error_code.
-
Otherwise, make_exception_ptr(err).
For a subexpression expr, let AS-CONST(expr) be expression-equivalent to[](const auto& x) noexcept -> const auto& { return x; }(expr)