tmp/tmp6x1czeas/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### `execution::starts_on` <a id="exec.starts.on">[[exec.starts.on]]</a>
|
| 2 |
+
|
| 3 |
+
`starts_on` adapts an input sender into a sender that will start on an
|
| 4 |
+
execution agent belonging to a particular scheduler’s associated
|
| 5 |
+
execution resource.
|
| 6 |
+
|
| 7 |
+
The name `starts_on` denotes a customization point object. For
|
| 8 |
+
subexpressions `sch` and `sndr`, if `decltype(( sch))` does not satisfy
|
| 9 |
+
`scheduler`, or `decltype((sndr))` does not satisfy `sender`,
|
| 10 |
+
`starts_on(sch, sndr)` is ill-formed.
|
| 11 |
+
|
| 12 |
+
Otherwise, the expression `starts_on(sch, sndr)` is
|
| 13 |
+
expression-equivalent to:
|
| 14 |
+
|
| 15 |
+
``` cpp
|
| 16 |
+
transform_sender(
|
| 17 |
+
query-with-default(get_domain, sch, default_domain()),
|
| 18 |
+
make-sender(starts_on, sch, sndr))
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
except that `sch` is evaluated only once.
|
| 22 |
+
|
| 23 |
+
Let `out_sndr` and `env` be subexpressions such that `OutSndr` is
|
| 24 |
+
`decltype((out_sndr))`. If `sender-for<OutSndr, starts_on_t>` is
|
| 25 |
+
`false`, then the expressions `starts_on.transform_env(out_sndr, env)`
|
| 26 |
+
and `starts_on.transform_sender(out_sndr, env)` are ill-formed;
|
| 27 |
+
otherwise
|
| 28 |
+
|
| 29 |
+
- `starts_on.transform_env(out_sndr, env)` is equivalent to:
|
| 30 |
+
``` cpp
|
| 31 |
+
auto&& [_, sch, _] = out_sndr;
|
| 32 |
+
return JOIN-ENV(SCHED-ENV(sch), FWD-ENV(env));
|
| 33 |
+
```
|
| 34 |
+
- `starts_on.transform_sender(out_sndr, env)` is equivalent to:
|
| 35 |
+
``` cpp
|
| 36 |
+
auto&& [_, sch, sndr] = out_sndr;
|
| 37 |
+
return let_value(
|
| 38 |
+
schedule(sch),
|
| 39 |
+
[sndr = std::forward_like<OutSndr>(sndr)]() mutable
|
| 40 |
+
noexcept(is_nothrow_move_constructible_v<decay_t<OutSndr>>) {
|
| 41 |
+
return std::move(sndr);
|
| 42 |
+
});
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
Let `out_sndr` be a subexpression denoting a sender returned from
|
| 46 |
+
`starts_on(sch, sndr)` or one equal to such, and let `OutSndr` be the
|
| 47 |
+
type `decltype((out_sndr))`. Let `out_rcvr` be a subexpression denoting
|
| 48 |
+
a receiver that has an environment of type `Env` such that
|
| 49 |
+
`sender_in<OutSndr, Env>` is `true`. Let `op` be an lvalue referring to
|
| 50 |
+
the operation state that results from connecting `out_sndr` with
|
| 51 |
+
`out_rcvr`. Calling `start(op)` shall start `sndr` on an execution agent
|
| 52 |
+
of the associated execution resource of `sch`. If scheduling onto `sch`
|
| 53 |
+
fails, an error completion on `out_rcvr` shall be executed on an
|
| 54 |
+
unspecified execution agent.
|
| 55 |
+
|