// Preemption between Jobs within Queue.
for _, queue := range queues { // loop 1
for {... // loop 2
}
// Preemption between Task within Job.
for _, job := range underRequest {... // loop 3
}
}
I'm kind of confused of the position of loop 3. Maybe it can be moved out of loop 1, since it seems to have no relation with queue.
I think in some case it may bring large overhead. Let me if I miss any consideration. thx
I think that the difference is that loop2 only consider preempt between jobs and loop3 consider preempt within jobs, we can know the differencr by checking the filtre func param of preempt.
Please describe your problem in detail
In preempt action, I see preempt logic like:
I'm kind of confused of the position of loop 3. Maybe it can be moved out of loop 1, since it seems to have no relation with queue.
I think in some case it may bring large overhead. Let me if I miss any consideration. thx