3 ms·
explicit yields. That's so 1984 Macintosh. "Cooperative multitasking". The usual effect of that style of programming is stuck window managers.
by Animats 5y ago
explicit yields.
That's so 1984 Macintosh. "Cooperative multitasking".
The usual effect of that style of programming is stuck window managers.
- staticassertion 5y agoYou still get preemption at the thread level.
- pcwalton 5y agoSo use threads! That's what they're there for. Go's solution is threads, just with a particularly idiosyncratic M:N implementation. Rust threads are 1:1. But they're the same concept. You can even get M:N if you really want it (nobody does, which is why mioco gets no use).
- jjav 5y agoExactly. It's painful that the same problems get revisited as new things. Computation needs to be scheduled to a CPU or core for parallel progress to occur. That means kernel threads.
- monocasa 5y agoThere's nothing wrong with explicit yields within a single process. It's only when the kernel scheduler can't preempt you that you end up with stuck window managers.