mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:07:36 +00:00
LibCore: Exit EventLoop::spin_until() when exit requested
This keeps WebContent from staying open if it's spinning forever trying to load a page.
This commit is contained in:
parent
dc5d85b609
commit
da96c151ab
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ int EventLoop::exec()
|
||||||
void EventLoop::spin_until(Function<bool()> goal_condition)
|
void EventLoop::spin_until(Function<bool()> goal_condition)
|
||||||
{
|
{
|
||||||
EventLoopPusher pusher(*this);
|
EventLoopPusher pusher(*this);
|
||||||
while (!goal_condition())
|
while (!m_impl->was_exit_requested() && !goal_condition())
|
||||||
pump();
|
pump();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue