event/Loop: move the "again" check out of the mutex scope

This commit is contained in:
Max Kellermann 2020-12-01 20:29:00 +01:00
parent 790e540c19
commit 4e88f95f94

View File

@ -330,15 +330,14 @@ EventLoop::Run() noexcept
const std::lock_guard<Mutex> lock(mutex);
HandleInject();
busy = false;
if (again)
/* re-evaluate timers because one of
the IdleEvents may have added a
new timeout */
continue;
}
#endif
if (again)
/* re-evaluate timers because one of the
DeferEvents may have added a new timeout */
continue;
/* wait for new event */
Wait(timeout);