asyncResourceGatherer: stop worker threads when application is going to exit (#481)

This commit is contained in:
Yang, Ying-chao 2024-09-05 19:27:43 +08:00 committed by GitHub
parent 0b030d33c8
commit 153977aab3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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