From 599e094563dcbfe29f536ae782894133c2efd5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Wed, 13 Sep 2023 22:32:46 +0200 Subject: [PATCH] bar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- src/scheduler/task.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/scheduler/task.rs b/src/scheduler/task.rs index 84430fcac1..a0320e7b70 100644 --- a/src/scheduler/task.rs +++ b/src/scheduler/task.rs @@ -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() { @@ -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(); } @@ -692,5 +694,9 @@ impl BlockedTaskQueue { .current() .map_or_else(|| None, |node| node.wakeup_time), ); + + for task in tasks { + Self::wakeup_task(task); + } } }