From 014f8868f215175fc8db41f79d57588db9ea1d4d Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 26 Jan 2016 22:09:08 +0000 Subject: std::condvar is broken on Win32 with gcc/g++ 4.8 too Use boost... --- contrib/epee/include/syncobj.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'contrib/epee/include') diff --git a/contrib/epee/include/syncobj.h b/contrib/epee/include/syncobj.h index b81eb43a9..275324436 100644 --- a/contrib/epee/include/syncobj.h +++ b/contrib/epee/include/syncobj.h @@ -30,8 +30,6 @@ #ifndef __WINH_OBJ_H__ #define __WINH_OBJ_H__ -#include -#include #include #include #include @@ -51,22 +49,22 @@ namespace epee void raise() { - std::unique_lock lock(m_mx); + boost::unique_lock lock(m_mx); m_rised = true; m_cond_var.notify_one(); } void wait() { - std::unique_lock lock(m_mx); + boost::unique_lock lock(m_mx); while (!m_rised) m_cond_var.wait(lock); m_rised = false; } private: - std::mutex m_mx; - std::condition_variable m_cond_var; + boost::mutex m_mx; + boost::condition_variable m_cond_var; bool m_rised; }; -- cgit v1.2.3