summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-07-21 17:36:59 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-07-21 22:42:36 +0300
commit3cd27c658a4aa94f68cd2f5c96e638a28d2c4297 (patch)
treeb9640239aae0c63b5e2c855912f013cbb937381a /indra/newview/llinventorymodel.cpp
parent413a42e3ef89a6394265f7ccb4531385da552eda (diff)
#6014 Inventory cache tweaks
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r--indra/newview/llinventorymodel.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 9a1cc3b122..dbcade88c2 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -2485,28 +2485,28 @@ void LLInventoryModel::cache(
void LLInventoryModel::waitForPendingCacheWrites()
{
+ if (sPendingCacheThreads.empty())
+ {
+ return;
+ }
LL_PROFILE_ZONE_SCOPED;
// By this point all threads should have already been added,
// viewer is shutting down, main thread is the only one to
// modify sPendingCacheThreads
- if (!sPendingCacheThreads.empty())
- {
- LL_DEBUGS(LOG_INV) << "Waiting for " << sPendingCacheThreads.size()
- << " inventory cache compression thread(s) to complete..." << LL_ENDL;
-
- LLTimer wait_timer;
+ LL_DEBUGS(LOG_INV) << "Waiting for " << sPendingCacheThreads.size()
+ << " inventory cache compression thread(s) to complete..." << LL_ENDL;
- for (auto& thread : sPendingCacheThreads)
+ for (auto& thread : sPendingCacheThreads)
+ {
+ if (thread.joinable())
{
- if (thread.joinable())
- {
- thread.join();
- }
+ thread.join();
}
-
- LL_INFOS(LOG_INV) << "Inventory cache compression completed" << LL_ENDL;
}
+ sPendingCacheThreads.clear();
+
+ LL_INFOS(LOG_INV) << "Inventory cache compression completed" << LL_ENDL;
}
void LLInventoryModel::addCategory(LLViewerInventoryCategory* category)