4 ms·
> One thing which usually happens is that engineers get overwhelmed with 2 threading models: They might already have a hard time to understand how normal thread
by nicoburns 5y ago
> One thing which usually happens is that engineers get overwhelmed with 2 threading models: They might already have a hard time to understand how normal threading works, and coroutines add another dimension on top of that. That's a non-issue for the engineers working on the proposals and some of the affected libraries since they are domain experts, but the minority of implementors of an API server or users of a HTTP client are actually IO experts.
IMO it's traditional threading that's hard to get your head around not async. Pre-emption makes things much more complex.
- pas 5y agoIsn't it the std lib's (and the compiler's) job to provide abstractions that allow the programmer to not think about preemption?
- Matthias247 5y agoI see where you are coming from. Preemptive multitasking definitely introduces room for errors which are not possible in pure cooperative multitasking - like Javascript. However with multi-threaded languages like C++, C#, Java, Rust, etc. you always have to care about all of that complexity. Including ones where you cooperative coroutine might be resumed on a different OS thread. So it keeps being harder. Also after moving to Rust, traditional threading lost a lot of its scariness. The type system is just so good at preventing the multithreading errors.