From 4e88f95f94cdf98f14937c5de9d53a3d08a3c93f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 1 Dec 2020 20:29:00 +0100 Subject: [PATCH] event/Loop: move the "again" check out of the mutex scope --- src/event/Loop.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/event/Loop.cxx b/src/event/Loop.cxx index 86bb93250..32635d6d7 100644 --- a/src/event/Loop.cxx +++ b/src/event/Loop.cxx @@ -330,15 +330,14 @@ EventLoop::Run() noexcept const std::lock_guard 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);