From 77d6215483f29662347b534d6567efe343ddcbec Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 6 Dec 2024 14:48:11 +0200 Subject: [PATCH] Removed periodic worker --- CMakeLists.txt | 3 +-- src/details/periodic_worker.cpp | 22 ---------------------- 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 src/details/periodic_worker.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index b39ae047..64c81f70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,8 +198,7 @@ set(SPDLOG_SRCS "src/details/os_filesystem.cpp" "src/details/log_msg.cpp" "src/details/log_msg_buffer.cpp" - "src/details/periodic_worker.cpp" - "src/details/context.cpp" + "src/details/context.cpp" "src/details/thread_pool.cpp" "src/sinks/base_sink.cpp" "src/sinks/basic_file_sink.cpp" diff --git a/src/details/periodic_worker.cpp b/src/details/periodic_worker.cpp deleted file mode 100644 index 9a54b265..00000000 --- a/src/details/periodic_worker.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright(c) 2015-present, Gabi Melman & spdlog contributors. -// Distributed under the MIT License (http://opensource.org/licenses/MIT) - -#include "spdlog/details/periodic_worker.h" - -namespace spdlog { -namespace details { - -// stop the worker thread and join it -periodic_worker::~periodic_worker() { - if (worker_thread_.joinable()) { - { - std::lock_guard lock(mutex_); - active_ = false; - } - cv_.notify_one(); - worker_thread_.join(); - } -} - -} // namespace details -} // namespace spdlog