File indexing completed on 2025-01-30 10:24:43
0001
0002
0003
0004 #pragma once
0005
0006 #ifndef SPDLOG_HEADER_ONLY
0007 # include <spdlog/details/periodic_worker.h>
0008 #endif
0009
0010 namespace spdlog {
0011 namespace details {
0012
0013
0014 SPDLOG_INLINE periodic_worker::~periodic_worker()
0015 {
0016 if (worker_thread_.joinable())
0017 {
0018 {
0019 std::lock_guard<std::mutex> lock(mutex_);
0020 active_ = false;
0021 }
0022 cv_.notify_one();
0023 worker_thread_.join();
0024 }
0025 }
0026
0027 }
0028 }