summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2022-08-06 23:32:05 +0200
committerGitHub <noreply@github.com>2022-08-06 23:32:05 +0200
commit9fcfaaadb609344d24349c525cf0945f3110717a (patch)
tree91d96d70d64725a52e8fcb1d9420ad7da0f5ff35 /src
parent9564a4cd127d2d24324fc8a9adb6096960248ec8 (diff)
parent355ee15039316429197f07515126c2d2b8c49af4 (diff)
Merge pull request #484 from rubyist/unlock-then-sleep
unlock the event queue before sleeping
Diffstat (limited to 'src')
-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;
}