Commit 7690038
Jack Veenstra
Fair round-robin scheduling of jobs.
This fixes a bug with picking jobs fairly when there are some empty queues. For
example, suppose queues A, and B are empty, while C and D each have 4 jobs.
Before this change, the scheduler would start searching at queue A and
eventually pick a job from C. Then it would start searching from B and pick
another job from C. Then it would start searching at C and pick a job from C.
Finally it would start searching from D and pick a job from D. So the jobs
would be executed in the order: C, C, C, D, C, D, D, D. But we would like
fair scheduling where the jobs alternate between C and D. To fix this bug,
the code starts the next search from the next queue that follows the one from
which we took the last job.
Also bump the version number to 0.1.4.1 parent 7658284 commit 7690038
2 files changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
0 commit comments