4 ms·
Rust shines as a language that both allows threaded and async programming, especially by being able to model concurrency issues. But async programming was alwa
by Argorak 7y ago
Rust shines as a language that both allows threaded and async programming, especially by being able to model concurrency issues.
But async programming was always hampered by several issues, which made it's own code generation and syntax necessary. Mostly, that's borrowing over yield points.
This enables Rust to be a language about choice: you can easily mix async and threaded code, with both being supported by the language just as well. The magic is that the `async/.await` support doesn't come with a runtime, you can choose it yourself.
Want predominantly threaded stuff? Use a threadpool (and maybe `await` the result). Predominantly concurrency? Use a runtime like https://async.rs https://async.rs and let run your code on that.