diff options
Diffstat (limited to 'src/OSSupport/Event.cpp')
-rw-r--r-- | src/OSSupport/Event.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/OSSupport/Event.cpp b/src/OSSupport/Event.cpp index 623357766..dc1cfbb37 100644 --- a/src/OSSupport/Event.cpp +++ b/src/OSSupport/Event.cpp @@ -24,7 +24,7 @@ void cEvent::Wait(void) { { std::unique_lock<std::mutex> Lock(m_Mutex); - m_CondVar.wait(Lock, [this](){ return m_ShouldContinue; }); + m_CondVar.wait(Lock, [this]() { return m_ShouldContinue; }); m_ShouldContinue = false; } } @@ -38,8 +38,9 @@ bool cEvent::Wait(unsigned a_TimeoutMSec) auto dst = std::chrono::system_clock::now() + std::chrono::milliseconds(a_TimeoutMSec); bool Result; { - std::unique_lock<std::mutex> Lock(m_Mutex); // We assume that this lock is acquired without much delay - we are the only user of the mutex - Result = m_CondVar.wait_until(Lock, dst, [this](){ return m_ShouldContinue; }); + std::unique_lock<std::mutex> Lock(m_Mutex + ); // We assume that this lock is acquired without much delay - we are the only user of the mutex + Result = m_CondVar.wait_until(Lock, dst, [this]() { return m_ShouldContinue; }); m_ShouldContinue = false; } return Result; @@ -70,8 +71,3 @@ void cEvent::SetAll(void) } m_CondVar.notify_all(); } - - - - - |