Commit cc139fb
Fix saturation_factor=0 to allow task assignment to idle workers
The previous implementation returned 0 for idle workers when
saturation_factor=0, which caused _worker_full() to incorrectly
mark idle workers as full (since it checks `<= 0`). This prevented
any tasks from being assigned, causing test timeouts.
Changed _task_slots_available() to return 1 for idle workers when
saturation_factor=0, allowing idle workers to accept tasks while
still preventing queuing on busy workers.
Behavior with saturation_factor=0:
- Idle worker: slots = 1 (can accept tasks)
- Worker with 1 task: slots = 0 (marked as full)
- Worker with seceded task: slots = 1 (can accept tasks)
Fixes test_saturation_factor[0.0-expected_task_counts5] timeout.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 66ed359 commit cc139fb
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9289 | 9289 | | |
9290 | 9290 | | |
9291 | 9291 | | |
9292 | | - | |
| 9292 | + | |
9293 | 9293 | | |
9294 | 9294 | | |
9295 | 9295 | | |
| |||
0 commit comments