#include <periodic_worker.h>
Definition at line 23 of file periodic_worker.h.
spdlog::details::periodic_worker::periodic_worker |
( |
const std::function< void()> & |
callback_fun, |
|
|
std::chrono::seconds |
interval |
|
) |
| |
|
inline |
Definition at line 26 of file periodic_worker.h.
28 active_ = (interval > std::chrono::seconds::zero());
37 std::unique_lock<std::mutex> lock(this->
mutex_);
38 if (this->
cv_.wait_for(lock, interval, [
this] { return !this->active_; }))
std::condition_variable cv_
std::thread worker_thread_
spdlog::details::periodic_worker::periodic_worker |
( |
const periodic_worker & |
| ) |
|
|
delete |
spdlog::details::periodic_worker::~periodic_worker |
( |
| ) |
|
|
inline |
Definition at line 51 of file periodic_worker.h.
56 std::lock_guard<std::mutex> lock(
mutex_);
std::condition_variable cv_
std::thread worker_thread_
bool spdlog::details::periodic_worker::active_ |
|
private |
std::condition_variable spdlog::details::periodic_worker::cv_ |
|
private |
std::mutex spdlog::details::periodic_worker::mutex_ |
|
private |
std::thread spdlog::details::periodic_worker::worker_thread_ |
|
private |
The documentation for this class was generated from the following file: