From 18ec799992e0e2571ed3d3a61454be682a81aa16 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 27 Feb 2024 23:02:00 +0200 Subject: SL-18721 Shutdown fixes #5 --- indra/llcommon/threadpool.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/threadpool.cpp b/indra/llcommon/threadpool.cpp index a063a01b82..c48989358e 100644 --- a/indra/llcommon/threadpool.cpp +++ b/indra/llcommon/threadpool.cpp @@ -120,8 +120,11 @@ void LL::ThreadPoolBase::close() mQueue->close(); for (auto& pair: mThreads) { - LL_DEBUGS("ThreadPool") << mName << " waiting on thread " << pair.first << LL_ENDL; - pair.second.join(); + if (pair.second.joinable()) + { + LL_DEBUGS("ThreadPool") << mName << " waiting on thread " << pair.first << LL_ENDL; + pair.second.join(); + } } LL_DEBUGS("ThreadPool") << mName << " shutdown complete" << LL_ENDL; } -- cgit v1.2.3