Files
cppdraft_translate/cppdraft/exec/get/compl/sched.md
2025-10-25 03:02:53 +03:00

2.3 KiB
Raw Blame History

[exec.get.compl.sched]

33 Execution control library [exec]

33.5 Queries [exec.queries]

33.5.9 execution::get_completion_scheduler [exec.get.compl.sched]

1

#

get_completion_scheduler<completion-tag> obtains the completion scheduler associated with a completion tag from a sender's attributes.

2

#

The name get_completion_scheduler denotes a query object template.

For a subexpression q, the expression get_completion_scheduler<completion-tag>(q) is ill-formed if completion-tag is not one ofset_value_t, set_error_t, or set_stopped_t.

Otherwise, get_completion_scheduler<completion-tag>(q) is expression-equivalent toMANDATE-NOTHROW(AS-CONST(q).query(get_completion_scheduler<completion-tag>))Mandates: If the expression above is well-formed, its type satisfies scheduler.

3

#

Let completion-fn be a completion function ([exec.async.ops]); let completion-tag be the associated completion tag of completion-fn; let args be a pack of subexpressions; and let sndr be a subexpression such that sender<decltype((sndr))> is true andget_completion_scheduler<completion-tag>(get_env(sndr)) is well-formed and denotes a scheduler sch.

If an asynchronous operation created by connecting sndr with a receiver rcvr causes the evaluation of completion-fn(rcvr, args...), the behavior is undefined unless the evaluation happens on an execution agent that belongs to sch's associated execution resource.

4

#

The expressionforwarding_query(get_completion_scheduler<completion-tag>) is a core constant expression and has value true.