Re:How to think about `async`/`await` in Rust
by gpderetta on Wednesday July 05, 2023 @06:57PM
(#36608371)
Stackful vs stackless, that's the big difference and the point of the original comment. Stackful abstractions are strictly more powerful of stackless ones (go coroutines subsume async/await but not viceversa).
You can have good ergonomics and performance with stackful cooperatively scheduled tasks instead of a stackless sync/await abstraction.
Async/await makes sense when you have so many tasks that you cant afford to dedicate a full stack to each of them and segmented stacks or heap allocated frames are not an option (for performance or compatibility).
You can have good ergonomics and performance with stackful cooperatively scheduled tasks instead of a stackless sync/await abstraction.
Async/await makes sense when you have so many tasks that you cant afford to dedicate a full stack to each of them and segmented stacks or heap allocated frames are not an option (for performance or compatibility).