core: fixup deadlock in timersThr exit cond

This commit is contained in:
Vaxry 2024-02-20 03:18:17 +00:00
parent b23b0a6d32
commit e57f146bad

View file

@ -158,7 +158,7 @@ void CHyprlock::run() {
float least = 10000;
for (auto& t : m_vTimers) {
const auto TIME = t->leftMs();
const auto TIME = std::clamp(t->leftMs(), 1.f, INFINITY);
if (TIME < least)
least = TIME;
}
@ -238,7 +238,7 @@ void CHyprlock::run() {
break;
}
std::lock_guard<std::mutex> lg2(m_sLoopState.timerRequestMutex);
m_sLoopState.timerEvent = true;
m_sLoopState.timerCV.notify_all();
g_pRenderer->asyncResourceGatherer->notify();