3 ms·
Any process or thread can be descheduled by the OS on top of the stuff it does on its own. Yielding is a thing from the multithreaded world with synchronous AP
by zzzcpan 9y ago
Any process or thread can be descheduled by the OS on top of the stuff it does on its own.
Yielding is a thing from the multithreaded world with synchronous APIs. Asynchronous systems don't yield, they are programmed asynchronously. They have no yielding overhead and can never be slower than yielding threads.
If you are arguing for 1:1 kernel threading against M:N threading (coroutines, goroutines, green threads) that's fine, but multithreading implementations have absolutely nothing to do with asynchronous systems.
- zbentley 9y agoIt seems like the two of you disagree fundamentally on what "asynchronous" means in this context. https://en.wikipedia.org/wiki/Asynchrony_(computer_programming) https://en.wikipedia.org/wiki/Asynchrony_(computer_programmi...
- zzzcpan 9y agoI don't think we disagree on that, since he explicitly mentions event loops and essentially claims they are generally slower. Which is nonsense.