diff options
Diffstat (limited to 'zenstore/gc.cpp')
| -rw-r--r-- | zenstore/gc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/zenstore/gc.cpp b/zenstore/gc.cpp index d23e0c466..0e93f1c3d 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(); } } @@ -427,8 +429,6 @@ GcScheduler::Trigger(const GcScheduler::TriggerParams& Params) void GcScheduler::SchedulerThread() { - using namespace fmt::literals; - std::chrono::seconds WaitTime = m_Config.MonitorInterval; for (;;) @@ -472,7 +472,7 @@ GcScheduler::SchedulerThread() NiceBytes(Space.Free), NiceBytes(Space.Total), m_Config.Interval.count() - ? "{} until next GC"_format(NiceTimeSpanMs(uint64_t(std::chrono::milliseconds(RemaingTime).count()))) + ? fmt::format("{} until next GC", NiceTimeSpanMs(uint64_t(std::chrono::milliseconds(RemaingTime).count()))) : std::string("next scheduled GC no set")); // TODO: Trigger GC if max disk usage water mark is reached |