If the local queue becomes empty, the worker transitions to checking the external queue.
|
} else { |
|
// Transition to checking the external queue. |
|
state = 1 |
|
} |
If it finds work there, it will immediately transition back to crunching the local queue.
|
// Transition to executing fibers from the local queue. |
|
state = 4 |
This offers no opportunity to fire timers or poll for I/O.
If the local queue becomes empty, the worker transitions to checking the external queue.
cats-effect/core/jvm/src/main/scala/cats/effect/unsafe/WorkerThread.scala
Lines 824 to 827 in a49a028
If it finds work there, it will immediately transition back to crunching the local queue.
cats-effect/core/jvm/src/main/scala/cats/effect/unsafe/WorkerThread.scala
Lines 668 to 669 in a49a028
This offers no opportunity to fire timers or poll for I/O.