mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-11-16 23:05:58 +01:00
core: add wait timeout to main thread
This commit is contained in:
parent
394dc81ff3
commit
b23b0a6d32
1 changed files with 1 additions and 1 deletions
|
@ -185,7 +185,7 @@ void CHyprlock::run() {
|
|||
while (1) {
|
||||
std::unique_lock lk(m_sLoopState.eventRequestMutex);
|
||||
if (m_sLoopState.event == false)
|
||||
m_sLoopState.loopCV.wait(lk, [this] { return m_sLoopState.event; });
|
||||
m_sLoopState.loopCV.wait_for(lk, std::chrono::milliseconds(5000), [this] { return m_sLoopState.event; });
|
||||
|
||||
if (m_bTerminate)
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue