aboutsummaryrefslogtreecommitdiff
path: root/zenstore
diff options
context:
space:
mode:
Diffstat (limited to 'zenstore')
-rw-r--r--zenstore/gc.cpp4
-rw-r--r--zenstore/include/zenstore/gc.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/zenstore/gc.cpp b/zenstore/gc.cpp
index d23e0c466..92942b09f 100644
--- a/zenstore/gc.cpp
+++ b/zenstore/gc.cpp
@@ -393,7 +393,7 @@ GcScheduler::Initialize(const GcSchedulerConfig& Config)
}
m_NextGcTime = NextGcTime(m_LastGcTime);
- m_GcThread = std::jthread(&GcScheduler::SchedulerThread, this);
+ m_GcThread = std::thread(&GcScheduler::SchedulerThread, this);
}
void
@@ -403,6 +403,8 @@ GcScheduler::Shutdown()
{
m_Status = static_cast<uint32_t>(GcSchedulerStatus::kStopped);
m_GcSignal.notify_one();
+
+ m_GcThread.join();
}
}
diff --git a/zenstore/include/zenstore/gc.h b/zenstore/include/zenstore/gc.h
index 1540b66c2..b8ba338f0 100644
--- a/zenstore/include/zenstore/gc.h
+++ b/zenstore/include/zenstore/gc.h
@@ -204,7 +204,7 @@ private:
GcClock::TimePoint m_LastGcTime{};
GcClock::TimePoint m_NextGcTime{};
std::atomic_uint32_t m_Status{};
- std::jthread m_GcThread;
+ std::thread m_GcThread;
std::mutex m_GcMutex;
std::condition_variable m_GcSignal;
std::optional<TriggerParams> m_TriggerParams;