diff options
Diffstat (limited to 'src/zenstore/gc.cpp')
| -rw-r--r-- | src/zenstore/gc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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) |