News for hackers. Stuff that matters.
Re:How to think about `async`/`await` in Rust by mrfox321 on Wednesday July 05, 2023 @12:38PM (#36602918)
Right, so it's less efficient than async.

Async would let you yield at the gather.

Re:How to think about `async`/`await` in Rust by flohofwoe on Wednesday July 05, 2023 @01:48PM (#36604145)
The wait_all() "yields" to the operating system's thread scheduler, which switches to another thread that's ready to run (or if fibers are used instead of threads, a 'fiber scheduler' would switch to a different fiber within the same thread).

Taking into account that an async/await runtime also needs to switch to a different "context", the performance difference really shouldn't be all that big, especially if the task scheduler uses fibers (YMMV of course).