3 ms·
That's not the only difference. Coroutines also typically don't have nearly as many concurrency hazards because you can control when you yield.
by naasking 4y ago
That's not the only difference. Coroutines also typically don't have nearly as many concurrency hazards because you can control when you yield.
- dymk 4y agocoroutines can be either cooperative or not, depending on implementation, so it depends
- gpderetta 4y agoAnd so can threads.
- otabdeveloper4 4y agoThat's an implementation detail. Pthreads work differently, but historically kernel-mode cooperative threads were also popular at one time. (We decided to not go there because cooperative parallelism sucks balls.)