event/Loop: set "again" in AddDefer() only if HAVE_THREADED_EVENT_LOOP

Only AddDefer()/AddIdle() calls from within DeferEvents are relevant.
This commit is contained in:
Max Kellermann 2022-11-22 21:36:44 +01:00
parent d0d095cbcd
commit a57cf443ed

View File

@ -188,7 +188,12 @@ EventLoop::AddDefer(DeferEvent &e) noexcept
#endif
defer.push_back(e);
#ifdef HAVE_THREADED_EVENT_LOOP
/* setting this flag here is only relevant if we've been
called by a DeferEvent */
again = true;
#endif
}
void
@ -197,7 +202,12 @@ EventLoop::AddIdle(DeferEvent &e) noexcept
assert(IsInside());
idle.push_back(e);
#ifdef HAVE_THREADED_EVENT_LOOP
/* setting this flag here is only relevant if we've been
called by a DeferEvent */
again = true;
#endif
}
void