RU version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
33% Positive
Analyzed from 341 words in the discussion.
Trending Topics
#async#simply#tutorial#tokio#runtime#run#threads#cpu#locks#thread

Discussion (7 Comments)Read Original on HackerNews
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 :)
[1]: https://tokio.rs/tokio/tutorial/async
The rust flow is so much more natural to me.
If you hate garbage collection pauses (which most Rust users do) then don't use async.
> 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.