|
|
|
|
|
by olegp
1188 days ago
|
|
It's not a joke. There is no scheduling strategy, since fibers allow only for non pre-emptive multitasking. There may be multiple fibers, but only one running at a time within the same process. If a second request comes in while another is processing and assuming that the first doesn't yield control by doing I/O, for example, then the second request isn't processed until the first one completes. If the first does yield control, then the two may be processed in parallel within the same process, just like with async/await. |
|
Think of a data-shuffling pipeline that also updates statistics (in the background): running the next stage of the pipeline is more likely to get rid of lots of memory chunks than is running the statistics code. It also improves pipeline latency, of course. The scheduling definitely matters even for cooperative threading.