Namespaces
Variants
Views
Actions

std::execution::on

From cppreference.com
< cpp‎ | execution
Revision as of 12:18, 4 October 2024 by Space Mission (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 
 
 
Defined in header <execution>
execution::sender auto on( execution::scheduler auto sched,
                           execution::sender auto snd );
(since C++26)

[edit] Parameters

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

[edit] 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.

[edit] Example