Skip to content

Commit d1d3ee7

Browse files
committed
SL-18721 Shutdown fixes #5
1 parent e325c79 commit d1d3ee7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

indra/llcommon/threadpool.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,11 @@ void LL::ThreadPoolBase::close()
120120
mQueue->close();
121121
for (auto& pair: mThreads)
122122
{
123-
LL_DEBUGS("ThreadPool") << mName << " waiting on thread " << pair.first << LL_ENDL;
124-
pair.second.join();
123+
if (pair.second.joinable())
124+
{
125+
LL_DEBUGS("ThreadPool") << mName << " waiting on thread " << pair.first << LL_ENDL;
126+
pair.second.join();
127+
}
125128
}
126129
LL_DEBUGS("ThreadPool") << mName << " shutdown complete" << LL_ENDL;
127130
}

0 commit comments

Comments
 (0)