Skip to content

Commit

Permalink
bar
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed Sep 13, 2023
1 parent e6395c5 commit 599e094
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/scheduler/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,8 @@ impl BlockedTaskQueue {
}
}

let mut tasks = vec![];

// Loop through all blocked tasks.
let mut cursor = self.list.cursor_front_mut();
while let Some(node) = cursor.current() {
Expand All @@ -664,7 +666,7 @@ impl BlockedTaskQueue {
}

// Otherwise, this task has elapsed, so remove it from the list and wake it up.
Self::wakeup_task(node.task.clone());
tasks.push(node.task.clone());
cursor.remove_current();
}

Expand Down Expand Up @@ -692,5 +694,9 @@ impl BlockedTaskQueue {
.current()
.map_or_else(|| None, |node| node.wakeup_time),
);

for task in tasks {
Self::wakeup_task(task);
}
}
}

0 comments on commit 599e094

Please sign in to comment.