2 ms·
> not personally accounting for every possible context switch. Context switches remain expensive. I'm kind of on the fence about coroutines. They can sometime
by pjc50 5y ago
> not personally accounting for every possible context switch.
Context switches remain expensive.
I'm kind of on the fence about coroutines. They can sometimes simplify writing performant IO-dependent code, or can make it harder to debug. It feels that they've not reached their "final form", nor has the right set of structured programming norms developed around them yet.
- truffdog 5y agoI think the problem is they are really good for writing proxies like nginx, linkerd, haproxy, that everyone uses, so you have these really high profile, high performance siren songs. But they have a crucial design advantage- it is a tight loop making a small number of decisions before punting the work off to the OS. Then people start trying to apply coroutines to a bunch of arbitrarily complicated and unbounded business logic things and everything blows up.