原书出处
Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)
03 Chapter 3. Building Our Own Async Queues 收集结果与启动工作的区别
$( results.push(future::block_on($future)); )* results } }; }
It is essential that we keep the order of the results the same as the order of the futures passed in. Otherwise, the user will have no way of knowing which result belongs to which task. Also note that our join macro will return only one type, so we use our join macro as follows:
let outcome: Vec<u32> = join!(t_one, t_two); let
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)/_epub-src/OEBPS/ch03.html#id80
EPUB SHA-256:109ff0224da54833b0d49c82502e850845274913fe34a7168dcf36a9c075b4e0