mirror of
https://github.com/hyprwm/Hyprland
synced 2025-02-27 19:02:50 +01:00
Merge pull request #484 from rubyist/unlock-then-sleep
unlock the event queue before sleeping
This commit is contained in:
commit
9fcfaaadb6
1 changed files with 1 additions and 1 deletions
|
@ -80,8 +80,8 @@ void CEventManager::startThread() {
|
||||||
eventQueueMutex.lock();
|
eventQueueMutex.lock();
|
||||||
|
|
||||||
if (m_dQueuedEvents.empty()){ // if queue empty, sleep and ignore
|
if (m_dQueuedEvents.empty()){ // if queue empty, sleep and ignore
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
|
||||||
eventQueueMutex.unlock();
|
eventQueueMutex.unlock();
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue