From cb20bfd59a21e16928508feffa3ff556411aa095 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 29 Sep 2025 10:05:47 +0200 Subject: some bug fixes (#522) * fix for invalid regex in HttpBuildStoreService - triggers with most recent MSVC version * in GcScheduler don't wait for exit signal if exit has already been requested. this caused extended waits for shutdown in some automated tests on very fast machines, possibly also due to some behaviour change in condition_variable * speculative fix/workaround for issue with TLS teardown on secondary thread while main was tearing down trace --- src/zenstore/gc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/zenstore/gc.cpp') diff --git a/src/zenstore/gc.cpp b/src/zenstore/gc.cpp index 185bc2118..050ee3443 100644 --- a/src/zenstore/gc.cpp +++ b/src/zenstore/gc.cpp @@ -2093,10 +2093,11 @@ GcScheduler::SchedulerThread() { ZEN_ASSERT(WaitTime.count() >= 0); std::unique_lock Lock(m_GcMutex); - while (!Timeout) + while (!Timeout && (Status() != GcSchedulerStatus::kStopped)) { std::chrono::seconds ShortWait = Min(WaitTime, ShortWaitTime); bool ShortTimeout = std::cv_status::timeout == m_GcSignal.wait_for(Lock, ShortWait); + if (ShortTimeout) { if (WaitTime > ShortWaitTime) -- cgit v1.2.3