3 ms·
Ironically, priorities as a way of "giving control" to another thread only work if you have a shortage of CPU cores. On my 24-core workstation I can normally ru
by brucedawson 8y ago
Ironically, priorities as a way of "giving control" to another thread only work if you have a shortage of CPU cores. On my 24-core workstation I can normally run all runnable threads, regardless of priority. The implications are non-obvious.
- kazinator 8y agoYes because if you have a shortage of cores, you have more threads that are blocked or in a run queue. When you have threads queued, that's when prioritizing works: you need a backlog of waiting threads in order to choose the "best" one to proceed. If threads have cores, the prioritizing loses value.