From 32721d1421819fcd8ca0776421e147d59dad60ab Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 22 Oct 2026 12:19:49 -0400 Subject: 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. --- indra/newview/llinventorymodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorymodel.cpp') 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 #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(); -- cgit v1.3