Files
2025-10-25 03:02:53 +03:00

3.2 KiB
Raw Permalink Blame History

[exec.starts.on]

33 Execution control library [exec]

33.9 Senders [exec.snd]

33.9.12 Sender adaptors [exec.adapt]

33.9.12.5 execution::starts_on [exec.starts.on]

1

#

starts_on adapts an input sender into a sender that will start on an execution agent belonging to a particular scheduler's associated execution resource.

2

#

The name starts_on denotes a customization point object.

For subexpressions sch and sndr, if decltype((
sch)) does not satisfy scheduler, ordecltype((sndr)) does not satisfy sender,starts_on(sch, sndr) is ill-formed.

3

#

Otherwise, the expression starts_on(sch, sndr) is expression-equivalent to:transform_sender(query-with-default(get_domain, sch, default_domain()), make-sender(starts_on, sch, sndr)) except that sch is evaluated only once.

4

#

Let out_sndr and env be subexpressions such that OutSndr is decltype((out_sndr)).

If sender-for<OutSndr, starts_on_t> is false, then the expressions starts_on.transform_env(out_sndr, env) andstarts_on.transform_sender(out_sndr, env) are ill-formed; otherwise

starts_on.transform_env(out_sndr, env) is equivalent to:auto&& [_, sch, _] = out_sndr;return JOIN-ENV(SCHED-ENV(sch), FWD-ENV(env));

starts_on.transform_sender(out_sndr, env) is equivalent to:auto&& [_, sch, sndr] = out_sndr;return let_value( schedule(sch), sndr = std::forward_like(sndr) mutablenoexcept(is_nothrow_move_constructible_v<decay_t>) {return std::move(sndr); });

5

#

Let out_sndr be a subexpression denoting a sender returned from starts_on(sch, sndr) or one equal to such, and let OutSndr be the type decltype((out_sndr)).

Let out_rcvr be a subexpression denoting a receiver that has an environment of type Env such that sender_in<OutSndr, Env> is true.

Let op be an lvalue referring to the operation state that results from connecting out_sndr with out_rcvr.

Calling start(op) shall start sndr on an execution agent of the associated execution resource of sch.

If scheduling onto sch fails, an error completion on out_rcvr shall be executed on an unspecified execution agent.