Re:Tokio 1.0 – async runtime for Rust
by 10000truths on Wednesday December 23, 2020 @04:54PM
(#25522680)
OS threads are preemptive and their scheduling is beyond your control, which introduces potential data races. Green threads allow for cooperative scheduling, which is much harder to mess up.
[ Parent
| on HN ]
In my experience, past some level of code complexity, you get the pretty much same kind of races with cooperative scheduling as with preemptive scheduling – with the added risk that you did not expect a race with preemptive scheduling.
Still a fan of async programming, but that's a false benefit in my books :)