Merge pull request #484 from rubyist/unlock-then-sleep

unlock the event queue before sleeping
This commit is contained in:
Vaxry 2022-08-06 23:32:05 +02:00 committed by GitHub
commit 9fcfaaadb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}