tmp/tmp0l6ybh8f/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## General <a id="exec.general">[[exec.general]]</a>
|
| 2 |
+
|
| 3 |
+
This Clause describes components supporting execution of function
|
| 4 |
+
objects [[function.objects]].
|
| 5 |
+
|
| 6 |
+
The following subclauses describe the requirements, concepts, and
|
| 7 |
+
components for execution control primitives as summarized in
|
| 8 |
+
[[exec.summary]].
|
| 9 |
+
|
| 10 |
+
**Table: Execution control library summary** <a id="exec.summary">[exec.summary]</a>
|
| 11 |
+
|
| 12 |
+
| Subclause | | Header |
|
| 13 |
+
| ---------------- | ---------------- | ------------- |
|
| 14 |
+
| [[exec.sched]] | Schedulers | `<execution>` |
|
| 15 |
+
| [[exec.recv]] | Receivers | |
|
| 16 |
+
| [[exec.opstate]] | Operation states | |
|
| 17 |
+
| [[exec.snd]] | Senders | |
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
[[exec.pos]] shows the types of customization point objects
|
| 21 |
+
[[customization.point.object]] used in the execution control library.
|
| 22 |
+
|
| 23 |
+
**Table: Types of customization point objects in the execution control library** <a id="exec.pos">[exec.pos]</a>
|
| 24 |
+
|
| 25 |
+
| Customization point object type | Purpose | Examples |
|
| 26 |
+
| ------------------------------- | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| 27 |
+
| core | provide core execution functionality, and connection between core components | e.g., `connect`, `start` |
|
| 28 |
+
| completion functions | called by senders to announce the completion of the work (success, error, or cancellation) | `set_value`, `set_error`, `set_stopped` |
|
| 29 |
+
| 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`) |
|
| 30 |
+
| 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`) |
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
This clause makes use of the following exposition-only entities.
|
| 34 |
+
|
| 35 |
+
For a subexpression `expr`, let `MANDATE-NOTHROW(expr)` be
|
| 36 |
+
expression-equivalent to `expr`.
|
| 37 |
+
|
| 38 |
+
*Mandates:* `noexcept(expr)` is `true`.
|
| 39 |
+
|
| 40 |
+
``` cpp
|
| 41 |
+
namespace std {
|
| 42 |
+
template<class T>
|
| 43 |
+
concept movable-value = // exposition only
|
| 44 |
+
move_constructible<decay_t<T>> &&
|
| 45 |
+
constructible_from<decay_t<T>, T> &&
|
| 46 |
+
(!is_array_v<remove_reference_t<T>>);
|
| 47 |
+
}
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
For function types `F1` and `F2` denoting `R1(Args1...)` and
|
| 51 |
+
`R2(Args2...)`, respectively, `MATCHING-SIG(F1, F2)` is `true` if and
|
| 52 |
+
only if `same_as<R1(Args1&&...), R2(Args2&&...)>` is `true`.
|
| 53 |
+
|
| 54 |
+
For a subexpression `err`, let `Err` be `decltype((err))` and let
|
| 55 |
+
`AS-EXCEPT-PTR(err)` be:
|
| 56 |
+
|
| 57 |
+
- `err` if `decay_t<Err>` denotes the type `exception_ptr`.
|
| 58 |
+
*Preconditions:* `!err` is `false`.
|
| 59 |
+
- Otherwise, `make_exception_ptr(system_error(err))` if `decay_t<Err>`
|
| 60 |
+
denotes the type `error_code`.
|
| 61 |
+
- Otherwise, `make_exception_ptr(err)`.
|
| 62 |
+
|
| 63 |
+
For a subexpression `expr`, let `AS-CONST(expr)` be
|
| 64 |
+
expression-equivalent to
|
| 65 |
+
|
| 66 |
+
``` cpp
|
| 67 |
+
[](const auto& x) noexcept -> const auto& { return x; }(expr)
|
| 68 |
+
```
|
| 69 |
+
|