std::execution::when_all
来自cppreference.com
< cpp | experimental | execution
在标头 <experimental/execution> 定义
|
||
execution::sender auto when_all( execution::sender auto ...inputs |
(C++26 起) | |
参数
inputs | - | 一组发送器,when_all 的完成对其阻塞。只能包含可以以一组值完成的发送器。
|
返回值
返回一个发送器,一旦所有输入发送器都已完成则它完成。此发送器所发送的值就是各个输入发送器所发送的各个值,顺序为传递给 when_all
的实参顺序。
注解
-
when_all
返回的发送器,在最后完成的发送器所在的执行资源上内联完成,但不包括when_all
启动前就请求了stop
的情况,这时他在启动调用中内联完成。
参阅
(并发 TS) |
产生在所有给定 furure 或 shared_future 均就绪时成为就绪的 future (函数模板) |