Fix the condition in is_last_thread

This commit is contained in:
Jianfeng Jiang 2024-09-18 03:54:38 +00:00 committed by Tate, Hongliang Tian
parent 2bda8d17c4
commit f159b42b61

View File

@ -277,7 +277,7 @@ impl PosixThread {
let tasks = process.tasks().lock();
tasks
.iter()
.any(|task| !Thread::borrow_from_task(task).status().is_exited())
.all(|task| Thread::borrow_from_task(task).status().is_exited())
}
/// Gets the read-only credentials of the thread.