1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 12:05:08 +00:00

Thread: Normalize all for_each constructs to use IterationDecision

This way a caller can abort the for_each early if they want.
This commit is contained in:
Robin Burchell 2019-07-19 12:16:00 +02:00 committed by Andreas Kling
parent a5d80f7e3b
commit e74dce65e6
3 changed files with 39 additions and 24 deletions

View file

@ -178,6 +178,7 @@ void Thread::finalize_dying_threads()
InterruptDisabler disabler;
for_each_in_state(Thread::State::Dying, [&](Thread& thread) {
dying_threads.append(&thread);
return IterationDecision::Continue;
});
}
for (auto* thread : dying_threads)