From Jason Turner

[exec.continues.on]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpn56mgcl5/{from.md → to.md} +60 -0
tmp/tmpn56mgcl5/{from.md → to.md} RENAMED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### `execution::continues_on` <a id="exec.continues.on">[[exec.continues.on]]</a>
2
+
3
+ `continues_on` adapts a sender into one that completes on the specified
4
+ scheduler.
5
+
6
+ The name `continues_on` denotes a pipeable sender adaptor object. For
7
+ subexpressions `sch` and `sndr`, if `decltype((sch))` does not satisfy
8
+ `scheduler`, or `decltype((sndr))` does not satisfy `sender`,
9
+ `continues_on(sndr, sch)` is ill-formed.
10
+
11
+ Otherwise, the expression `continues_on(sndr, sch)` is
12
+ expression-equivalent to:
13
+
14
+ ``` cpp
15
+ transform_sender(get-domain-early(sndr), make-sender(continues_on, sch, sndr))
16
+ ```
17
+
18
+ except that `sndr` is evaluated only once.
19
+
20
+ The exposition-only class template *`impls-for`* [[exec.snd.expos]] is
21
+ specialized for `continues_on_t` as follows:
22
+
23
+ ``` cpp
24
+ namespace std::execution {
25
+ template<>
26
+ struct impls-for<continues_on_t> : default-impls {
27
+ static constexpr auto get-attrs =
28
+ [](const auto& data, const auto& child) noexcept -> decltype(auto) {
29
+ return JOIN-ENV(SCHED-ATTRS(data), FWD-ENV(get_env(child)));
30
+ };
31
+ };
32
+ }
33
+ ```
34
+
35
+ Let `sndr` and `env` be subexpressions such that `Sndr` is
36
+ `decltype((sndr))`. If `sender-for<Sndr, continues_on_t>` is `false`,
37
+ then the expression `continues_on.transform_sender(sndr, env)` is
38
+ ill-formed; otherwise, it is equal to:
39
+
40
+ ``` cpp
41
+ auto [_, data, child] = sndr;
42
+ return schedule_from(std::move(data), std::move(child));
43
+ ```
44
+
45
+ [*Note 1*: This causes the `continues_on(sndr, sch)` sender to become
46
+ `schedule_from(sch, sndr)` when it is connected with a receiver whose
47
+ execution domain does not customize `continues_on`. — *end note*]
48
+
49
+ Let `out_sndr` be a subexpression denoting a sender returned from
50
+ `continues_on(sndr, sch)` or one equal to such, and let `OutSndr` be the
51
+ type `decltype((out_sndr))`. Let `out_rcvr` be a subexpression denoting
52
+ a receiver that has an environment of type `Env` such that
53
+ `sender_in<OutSndr, Env>` is `true`. Let `op` be an lvalue referring to
54
+ the operation state that results from connecting `out_sndr` with
55
+ `out_rcvr`. Calling `start(op)` shall start `sndr` on the current
56
+ execution agent and execute completion operations on `out_rcvr` on an
57
+ execution agent of the execution resource associated with `sch`. If
58
+ scheduling onto `sch` fails, an error completion on `out_rcvr` shall be
59
+ executed on an unspecified execution agent.
60
+