summaryrefslogtreecommitdiff
path: root/src/managers/EventManager.cpp
diff options
context:
space:
mode:
authorScott Barron <scott@barron.io>2022-08-06 17:21:39 -0400
committerScott Barron <scott@barron.io>2022-08-06 17:21:54 -0400
commit355ee15039316429197f07515126c2d2b8c49af4 (patch)
tree9ae9f25581bd45c58f7ac4023b7485b880db32ee /src/managers/EventManager.cpp
parent3829b1626e2aea5eb479d29f3014f50b1961a1f7 (diff)
unlock the event queue before sleeping
Diffstat (limited to 'src/managers/EventManager.cpp')
-rw-r--r--src/managers/EventManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/managers/EventManager.cpp b/src/managers/EventManager.cpp
index 22299a01..2b2598e1 100644
--- a/src/managers/EventManager.cpp
+++ b/src/managers/EventManager.cpp
@@ -80,8 +80,8 @@ void CEventManager::startThread() {
eventQueueMutex.lock();
if (m_dQueuedEvents.empty()){ // if queue empty, sleep and ignore
- std::this_thread::sleep_for(std::chrono::milliseconds(1));
eventQueueMutex.unlock();
+ std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue;
}