Re:Comparison of Rust async and Linux thread context switch ...
by littlestymaar on Friday February 12, 2021 @01:49PM
(#26117019)
True, this doesn't work in Rust though, because nothing at all happens before the first time you poll a future, so you need an explicit task (but as other pointed out, it's pretty straightforward thanks to the `join!` macro).
And FWIW, this explicit form is often unnecessary - if you kick off each task they will run in parallel and then just await each task only when the result is needed, it can look a lot cleaner: