3 ms·
It's really nice on embedded systems for one. Share a single stack, but have blocking looking code. I really like the Rust model where astnc/await is mainly s
by monocasa 7y ago
It's really nice on embedded systems for one. Share a single stack, but have blocking looking code. I really like the Rust model where astnc/await is mainly syntax sugar, and you can just code the state machine manually if you want.
Edit: It's also nice on servers, because even if you have memory for all of those stacks in a no astnc world, you def don't have cache for all of them. Splitting the data that needs to be saved between blocking points from the temporary data that gets you to the next block point (and reusing that memory on the next task) has benefits in a modern memory architecture.