Skip to content

Commit

Permalink
BibSched: fixes ABOUT-TO-SLEEP scheduling bug
Browse files Browse the repository at this point in the history
* Fixes a scheduling bug occuring when a task is in "ABOUT TO SLEEP".
  It would previously try to sleep a task in about-to-sleep status
  over and over again.  (fixes #1078)
  • Loading branch information
Osso authored and tiborsimko committed Jun 12, 2012
1 parent 988fb52 commit 94dac04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/bibsched/lib/bibsched.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,8 @@ def get_tasks_to_sleep_and_stop(self, proc, task_set):
for (this_task_id, this_proc, this_priority, this_status, this_sequenceid) in task_set:
if not self.is_task_safe_to_execute(this_proc, proc):
to_stop.append((this_task_id, this_proc, this_priority, this_status, this_sequenceid))
elif (min_prio is None or this_priority < min_prio) and this_status != 'SLEEPING':
elif (min_prio is None or this_priority < min_prio) and \
this_status not in ('SLEEPING', 'ABOUT TO SLEEP'):
## We don't put to sleep already sleeping task :-)
min_prio = this_priority
min_task_id = this_task_id
Expand Down

0 comments on commit 94dac04

Please sign in to comment.