tmp/tmpw654_3gq/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### `execution::inline_scheduler` <a id="exec.inline.scheduler">[[exec.inline.scheduler]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std::execution {
|
| 5 |
+
class inline_scheduler {
|
| 6 |
+
class inline-sender; // exposition only
|
| 7 |
+
|
| 8 |
+
template<receiver R>
|
| 9 |
+
class inline-state; // exposition only
|
| 10 |
+
|
| 11 |
+
public:
|
| 12 |
+
using scheduler_concept = scheduler_t;
|
| 13 |
+
|
| 14 |
+
constexpr inline-sender schedule() noexcept { return {}; }
|
| 15 |
+
constexpr bool operator==(const inline_scheduler&) const noexcept = default;
|
| 16 |
+
};
|
| 17 |
+
}
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
`inline_scheduler` is a class that models `scheduler` [[exec.sched]].
|
| 21 |
+
All objects of type `inline_scheduler` are equal.
|
| 22 |
+
|
| 23 |
+
*`inline-sender`* is an exposition-only type that satisfies `sender`.
|
| 24 |
+
The type `completion_signatures_of_t<inline-sender>` is
|
| 25 |
+
`completion_signatures<set_value_t()>`.
|
| 26 |
+
|
| 27 |
+
Let `sndr` be an expression of type *`inline-sender`*, let `rcvr` be an
|
| 28 |
+
expression such that `receiver_of<decltype((rcvr)), CS>` is `true` where
|
| 29 |
+
`CS` is `completion_signatures<set_value_t()>`, then:
|
| 30 |
+
|
| 31 |
+
- the expression `connect(sndr, rcvr)` has type
|
| 32 |
+
`inline-state<remove_cvref_t<decltype((rcvr))>>` and is
|
| 33 |
+
potentially-throwing if and only if `((void)sndr, auto(rcvr))` is
|
| 34 |
+
potentially-throwing, and
|
| 35 |
+
- the expression `get_completion_scheduler<set_value_t>(get_env(sndr))`
|
| 36 |
+
has type `inline_scheduler` and is potentially-throwing if and only if
|
| 37 |
+
`get_env(sndr)` is potentially-throwing.
|
| 38 |
+
|
| 39 |
+
Let `o` be a non-`const` lvalue of type `inline-state<Rcvr>`, and let
|
| 40 |
+
`REC(o)` be a non-`const` lvalue reference to an object of type `Rcvr`
|
| 41 |
+
that was initialized with the expression `rcvr` passed to an invocation
|
| 42 |
+
of `connect` that returned `o`, then:
|
| 43 |
+
|
| 44 |
+
- the object to which `REC(o)` refers remains valid for the lifetime of
|
| 45 |
+
the object to which `o` refers, and
|
| 46 |
+
- the expression `start(o)` is equivalent to
|
| 47 |
+
`set_value(std::move(REC(o)))`.
|
| 48 |
+
|