zlacker

[return to "The bane of my existence: Supporting both async and sync code in Rust"]
1. toolto+sh[view] [source] 2024-01-19 23:36:57
>>lukast+(OP)
The comment threads here discuss async in many different languages: Rust, Go, JavaScript, Python. Can somebody knowledgeable describe how they are subtly different between languages? Why are they painful in some but not in others?

Is there already an article that describes this well?

◧◩
2. boustr+4k[view] [source] 2024-01-19 23:57:54
>>toolto+sh
I think the biggest underlying difference is that Rust does not have a language runtime, whereas the other three you've listed do. Since the language runtime can preempt your code at any time, it becomes a lot easier to make async work - at the expense that now data races are easier to create.

I'm not going to pretend I'm an expert but would be happy if someone could expand further.

[go to top]