Merge pull request #2270 from jamoflaw/deadlock-on-exit

Destroy semaphore after join
This commit is contained in:
erwincoumans
2019-06-10 19:24:28 -04:00
committed by GitHub

View File

@@ -304,8 +304,8 @@ void btThreadSupportPosix::stopThreads()
checkPThreadFunction(sem_post(threadStatus.startSemaphore));
checkPThreadFunction(sem_wait(m_mainSemaphore));
destroySem(threadStatus.startSemaphore);
checkPThreadFunction(pthread_join(threadStatus.thread, 0));
destroySem(threadStatus.startSemaphore);
}
destroySem(m_mainSemaphore);
m_activeThreadStatus.clear();