Who Runs Your Rust Future? Hands-On Intro to Async Rust
Posted by febin 2 days ago
Comments
Comment by Havoc 14 minutes ago
Comment by Twey 1 hour ago
There is actually already a tutorial at this level: Tokio has its ‘async in depth’ tutorial [1] that walks you through building a toy runtime and using it to run a future.
Not a complaint — you can never have too many tutorials, unless they're about monads — but just a pointer in case you hadn't seen it :)
Comment by uxns 1 hour ago
Comment by vanillameow 1 hour ago
Comment by Quarrel 1 hour ago
The rust flow is so much more natural to me.
Comment by preethamrangu 11 minutes ago
Comment by jameshungry 2 hours ago
Comment by amelius 59 minutes ago
If you hate garbage collection pauses (which most Rust users do) then don't use async.
Comment by himata4113 43 minutes ago
Comment by toprerules 49 minutes ago
> Whereas async simply locks the CPUWhereas async simply locks the CPU
This is also completely nonsense, context switching behavior is OS dependent and your average general purpose kernel is not cooperative. You will run for your allotted quanta or reschedule when you run out of coroutines that can execute without waiting for resources.