diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-07-21 19:18:13 -0400 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-08-01 17:54:25 +0300 |
commit | 86668633c30c711b44dd5a16f98b9ac056f706b5 (patch) | |
tree | afe8b0efc6e00a7727dbb439ee26dc82468c2928 | |
parent | 8f6e623a5fa7df3195da5ecd0ee32867185120c8 (diff) |
Fix failure to join or detach threads causing rare shutdown termination
-rw-r--r-- | indra/llcommon/llthread.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index 9eb92ca6a1..e5d25b52f0 100644 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -269,6 +269,7 @@ void LLThread::shutdown() mStatus = STOPPED; return; } + delete mThreadp; mThreadp = NULL; } @@ -299,6 +300,7 @@ void LLThread::start() { mThreadp = new std::thread(std::bind(&LLThread::threadRun, this)); mNativeHandle = mThreadp->native_handle(); + mThreadp->detach(); } catch (std::system_error& ex) { |