unlock the event queue before sleeping

This commit is contained in:
Scott Barron 2022-08-06 17:21:39 -04:00
parent 3829b1626e
commit 355ee15039

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