Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/execution/on"

From cppreference.com
< cpp‎ | execution
(move to cpp/experimental)
m (Reverted edits by Cooky (talk) to last revision by InbalL)
Line 1: Line 1:
 +
{{cpp/execution/title|on}}
 +
{{cpp/experimental/execution/navbar}}
  
 +
{{ddcl|header=execution|since=c++26|
 +
execution::sender auto on(
 +
    execution::scheduler auto sched,
 +
    execution::sender auto snd
 +
);
 +
}}
 +
 +
===Parameters===
 +
{{par begin}}
 +
{{par|sched|provides execution agent on which the sender will be executed}}
 +
{{par|snd|work to be executed on the execution resource associated with sched}}
 +
{{par end}}
 +
 +
===Return value===
 +
Returns a sender which, when started, will start the provided sender on an execution agent belonging to the execution resource associated with the provided scheduler.
 +
 +
The returned sender has no completion schedulers.

Revision as of 13:05, 3 October 2024

Defined in header <execution>
execution::sender auto on(

    execution::scheduler auto sched,
    execution::sender auto snd

);
(since C++26)

Parameters

sched - provides execution agent on which the sender will be executed
snd - work to be executed on the execution resource associated with sched

Return value

Returns a sender which, when started, will start the provided sender on an execution agent belonging to the execution resource associated with the provided scheduler.

The returned sender has no completion schedulers.