5 ms·
Is the question "why async X" just short for "why cooperative multitasking in X language"? Coming from the Python world where I've written a ton of async code
by nick238 3y ago
Is the question "why async X" just short for "why cooperative multitasking in X language"?
Coming from the Python world where I've written a ton of async code there (which I think is just a short way of saying cooperative concurrency?), it's generally easier to reason because you don't need to worry about getting preempted anywhere. If your application is mostly comprised of hurry-up-and-wait I/O code, single thread, single process can be great.
- harpiaharpyja 3y agoNo, if you read the article the question is not "why you should use async in Rust" or anything like that. It's literally "why async Rust" as in "why async Rust is the thing that it is," why it is that way, how it came to be, etc. There's some unavoidable level of relationship, but that's not the focus of the article.
- zozbot234 3y agoNot quite, you can do cooperative multitasking using fibers ('stackful' coroutines).