diff --git a/include/spdlog/details/async_log_helper.h b/include/spdlog/details/async_log_helper.h index 7b537361..deb8dcc6 100644 --- a/include/spdlog/details/async_log_helper.h +++ b/include/spdlog/details/async_log_helper.h @@ -229,8 +229,6 @@ inline spdlog::details::async_log_helper::~async_log_helper() inline void spdlog::details::async_log_helper::log(const details::log_msg& msg) { push_msg(async_msg(msg)); - - } inline void spdlog::details::async_log_helper::push_msg(details::async_log_helper::async_msg&& new_msg) @@ -246,7 +244,6 @@ inline void spdlog::details::async_log_helper::push_msg(details::async_log_helpe } while (!_q.enqueue(std::move(new_msg))); } - } // optionally wait for the queue be empty and request flush from the sinks @@ -281,10 +278,8 @@ inline void spdlog::details::async_log_helper::worker_loop() // return true if this thread should still be active (while no terminate msg was received) inline bool spdlog::details::async_log_helper::process_next_msg(log_clock::time_point& last_pop, log_clock::time_point& last_flush) { - async_msg incoming_async_msg; - if (_q.dequeue(incoming_async_msg)) { last_pop = details::os::now(); @@ -361,7 +356,6 @@ inline void spdlog::details::async_log_helper::sleep_or_yield(const spdlog::log_ if (time_since_op <= microseconds(100)) return std::this_thread::yield(); - // sleep for 20 ms upto 200 ms if (time_since_op <= milliseconds(200)) return sleep_for(milliseconds(20)); @@ -378,13 +372,7 @@ inline void spdlog::details::async_log_helper::wait_empty_q() { sleep_or_yield(details::os::now(), last_op); } - } - - - - -