Fix error when joining exited threads
The internal thread handles were cleared prematurely when attempting to join them. The handles should be also cleared when trying to kill already exited threads.
This commit is contained in:
@@ -98,10 +98,7 @@ void ThreadPoolService::Dispose()
|
||||
// Delete threads
|
||||
for (int32 i = 0; i < ThreadPoolImpl::Threads.Count(); i++)
|
||||
{
|
||||
if (ThreadPoolImpl::Threads[i]->IsRunning())
|
||||
{
|
||||
ThreadPoolImpl::Threads[i]->Kill(true);
|
||||
}
|
||||
ThreadPoolImpl::Threads[i]->Kill(true);
|
||||
}
|
||||
ThreadPoolImpl::Threads.ClearDelete();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user