1
0
Fork 0
mirror of https://github.com/KingDuckZ/incredis synced 2024-11-23 00:33:46 +00:00

Optimization - I *think* it's correct.

This commit is contained in:
King_DuckZ 2016-12-05 20:50:52 +00:00
parent 657ecd63e2
commit 093d1dd198

View file

@ -204,9 +204,10 @@ namespace redis {
}
void AsyncConnection::wakeup_event_thread() {
std::lock_guard<std::mutex> lock(m_local_data->libev_mutex);
if (ev_async_pending(&m_local_data->watcher_wakeup) == false)
if (ev_async_pending(&m_local_data->watcher_wakeup) == false) {
std::lock_guard<std::mutex> lock(m_local_data->libev_mutex);
ev_async_send(m_libev_loop_thread.get(), &m_local_data->watcher_wakeup);
}
}
std::mutex& AsyncConnection::event_mutex() {