Fix dead contexts clobber idle pools

This commit is contained in:
Wildan M
2026-04-29 11:20:21 +07:00
parent 866dfad0af
commit baf329c120
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -60,6 +60,9 @@ impl Status {
pub fn is_soft_blocked(&self) -> bool {
matches!(self, Self::Blocked)
}
pub fn is_dead(&self) -> bool {
matches!(self, Self::Dead { .. })
}
}
#[derive(Clone, Debug)]
+3
View File
@@ -336,6 +336,9 @@ fn wakeup_contexts(token: &mut CleanLockToken, switch_time: u128) -> Vec<(usize,
continue;
}
}
} else if guard.status.is_dead() {
// TODO: who hold this dead context?
continue;
}
if guard.status.is_runnable() && !guard.running {