SL-18721 Shutdown fixes #5

master
Andrey Kleshchev 2024-02-27 23:02:00 +02:00 committed by Andrey Kleshchev
parent 44ea949079
commit 18ec799992
1 changed files with 5 additions and 2 deletions

View File

@ -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;
}