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
1 changed files with 1 additions and 1 deletions

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