3 ms·
One example that comes in mid is that it can provide cooperative multitasking in user space. That gives you light speed context switching over potentially thous
by fla 8y ago
One example that comes in mid is that it can provide cooperative multitasking in user space. That gives you light speed context switching over potentially thousands of threads. It can make some software architecture (like actor models) much simpler to express.
- ur-whale 8y agoNot sure how the second sentence follows from the first here ... As for context switching speed, you may well be right, but I was under the impression that thread context switching in Linux is really cheap these days, almost as fast as userland coroutines.
- blattimwind 8y agoCoroutine switching can be as fast as a dozen or so ns. Meanwhile a thread context switch will still take a microsecond at least.