mirror of https://github.com/hyprwm/hyprlock.git
asyncResourceGatherer: stop worker threads when application is going to exit (#481)
This commit is contained in:
parent
0b030d33c8
commit
153977aab3
|
@ -171,7 +171,7 @@ void CAsyncResourceGatherer::gather() {
|
|||
}
|
||||
}
|
||||
|
||||
while (std::any_of(dmas.begin(), dmas.end(), [](const auto& d) { return !d->asset.ready; })) {
|
||||
while (!g_pHyprlock->m_bTerminate && std::any_of(dmas.begin(), dmas.end(), [](const auto& d) { return !d->asset.ready; })) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue