Skip to content

Commit 5b96d13

Browse files
🐛 preempted-postpone even when preemption disabled. (#738) (#739)
When a task is preempted, it needs to be postponed for a short duration to prevent thrashing. Since individual tasks may override the _global_ preempt policy, the postpone must happen regardless. Signed-off-by: Jeff Ortel <[email protected]> Signed-off-by: Cherry Picker <[email protected]> Signed-off-by: Jeff Ortel <[email protected]> Signed-off-by: Cherry Picker <[email protected]> Co-authored-by: Jeff Ortel <[email protected]>
1 parent 15b11a8 commit 5b96d13

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

Diff for: task/rule.go

-3
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ type RulePreempted struct {
7777
// Postpone based on a duration after the last preempted event.
7878
func (r *RulePreempted) Match(ready, _ *Task) (matched bool, reason string) {
7979
preemption := Settings.Hub.Task.Preemption
80-
if !preemption.Enabled {
81-
return
82-
}
8380
mark := time.Now()
8481
event, found := ready.LastEvent(Preempted)
8582
if found {

0 commit comments

Comments
 (0)