summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMike <contact@mikelittman.me>2026-10-22 12:19:49 -0400
committerGitHub <noreply@github.com>2026-10-23 00:19:49 +0800
commit32721d1421819fcd8ca0776421e147d59dad60ab (patch)
tree6b2a721c548609fb3bb7c70f0b2d0ab81f216b84 /indra/newview
parent0bd96379e6130481418cb25bdac5ba9416131afc (diff)
Do not abort when a shutdown thread joins itself (#40)
std::thread::join throws system_error if the caller is the thread being joined. That uncaught exception aborted the process during shutdown. Detach the current thread instead, and catch a join that still throws.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinventorymodel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index b818a66b30..31fd699335 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -31,6 +31,7 @@
#include <thread>
#include "llinventorymodel.h"
+#include "llthread.h"
#include "llaisapi.h"
#include "llagent.h"
@@ -2505,7 +2506,7 @@ void LLInventoryModel::waitForPendingCacheWrites()
{
if (thread.joinable())
{
- thread.join();
+ ll_join_thread(thread);
}
}
sPendingCacheThreads.clear();