Update periodic_worker-inl.h

Fix: Make this great log library DRD through cleanly test by valgrind --tool=drd.
pull/2815/head
Lovelace.Lee 2 years ago committed by GitHub
parent 7e635fca68
commit c855173001
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,10 +16,10 @@ SPDLOG_INLINE periodic_worker::~periodic_worker()
if (worker_thread_.joinable()) if (worker_thread_.joinable())
{ {
{ {
std::lock_guard<std::mutex> lock(mutex_); std::unique_lock<std::mutex> lock(mutex_);
active_ = false; active_ = false;
cv_.notify_one();
} }
cv_.notify_one();
worker_thread_.join(); worker_thread_.join();
} }
} }

Loading…
Cancel
Save