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
commit e74dce65e6
Notes: sideshowbarker 2024-07-19 13:09:03 +09:00
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)