The Isolated context scheduler immediately parks the thread when it needs to wait on a synchronization primitive such as a Channel.
If a channel has a large enough buffer, then the thread will immediately pick a value and continue, otherwise if the buffer is small, the channel is regularly emptied and the thread will park itself immediately.
The scheduler could try to spin with exponential backoff (at least ease the CPU, maybe even yield), instead of parking and waiting on a condition variable.
Note: other contexts may be affected, though those already spin (a bit).
The
Isolated
context scheduler immediately parks the thread when it needs to wait on a synchronization primitive such as a Channel.If a channel has a large enough buffer, then the thread will immediately pick a value and continue, otherwise if the buffer is small, the channel is regularly emptied and the thread will park itself immediately.
The scheduler could try to spin with exponential backoff (at least ease the CPU, maybe even yield), instead of parking and waiting on a condition variable.
Note: other contexts may be affected, though those already spin (a bit).