Commit e7ec922c authored by Gabi Melman's avatar Gabi Melman Committed by GitHub

Update async_log_helper.h

removed empty lines
parent 38456118
...@@ -229,8 +229,6 @@ inline spdlog::details::async_log_helper::~async_log_helper() ...@@ -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) inline void spdlog::details::async_log_helper::log(const details::log_msg& msg)
{ {
push_msg(async_msg(msg)); push_msg(async_msg(msg));
} }
inline void spdlog::details::async_log_helper::push_msg(details::async_log_helper::async_msg&& new_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 ...@@ -246,7 +244,6 @@ inline void spdlog::details::async_log_helper::push_msg(details::async_log_helpe
} }
while (!_q.enqueue(std::move(new_msg))); while (!_q.enqueue(std::move(new_msg)));
} }
} }
// optionally wait for the queue be empty and request flush from the sinks // 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() ...@@ -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) // 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) 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; async_msg incoming_async_msg;
if (_q.dequeue(incoming_async_msg)) if (_q.dequeue(incoming_async_msg))
{ {
last_pop = details::os::now(); last_pop = details::os::now();
...@@ -361,7 +356,6 @@ inline void spdlog::details::async_log_helper::sleep_or_yield(const spdlog::log_ ...@@ -361,7 +356,6 @@ inline void spdlog::details::async_log_helper::sleep_or_yield(const spdlog::log_
if (time_since_op <= microseconds(100)) if (time_since_op <= microseconds(100))
return std::this_thread::yield(); return std::this_thread::yield();
// sleep for 20 ms upto 200 ms // sleep for 20 ms upto 200 ms
if (time_since_op <= milliseconds(200)) if (time_since_op <= milliseconds(200))
return sleep_for(milliseconds(20)); return sleep_for(milliseconds(20));
...@@ -378,13 +372,7 @@ inline void spdlog::details::async_log_helper::wait_empty_q() ...@@ -378,13 +372,7 @@ inline void spdlog::details::async_log_helper::wait_empty_q()
{ {
sleep_or_yield(details::os::now(), last_op); sleep_or_yield(details::os::now(), last_op);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment