Commit 4d68a12f authored by Max Kellermann's avatar Max Kellermann

event/Loop: split the AtScopeExit()

Fixes the !HAVE_THREADED_EVENT_LOOP build.
parent 0e951da6
...@@ -200,20 +200,23 @@ EventLoop::Run() noexcept ...@@ -200,20 +200,23 @@ EventLoop::Run() noexcept
SocketMonitor::Schedule(SocketMonitor::READ); SocketMonitor::Schedule(SocketMonitor::READ);
#endif #endif
AtScopeExit(this) {
#ifdef HAVE_URING #ifdef HAVE_URING
AtScopeExit(this) {
/* make sure that the Uring::Manager gets destructed /* make sure that the Uring::Manager gets destructed
from within the EventThread, or else its from within the EventThread, or else its
destruction in another thread will cause assertion destruction in another thread will cause assertion
failures */ failures */
uring.reset(); uring.reset();
uring_initialized = false; uring_initialized = false;
};
#endif #endif
#ifdef HAVE_THREADED_EVENT_LOOP #ifdef HAVE_THREADED_EVENT_LOOP
AtScopeExit(this) {
SocketMonitor::Cancel(); SocketMonitor::Cancel();
#endif
}; };
#endif
do { do {
now = std::chrono::steady_clock::now(); now = std::chrono::steady_clock::now();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment