Removed periodic worker

This commit is contained in:
gabime 2024-12-06 14:48:11 +02:00
parent 2419dc7373
commit 77d6215483
2 changed files with 1 additions and 24 deletions

View File

@ -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"

View File

@ -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<std::mutex> lock(mutex_);
active_ = false;
}
cv_.notify_one();
worker_thread_.join();
}
}
} // namespace details
} // namespace spdlog