Merge pull request #2270 from jamoflaw/deadlock-on-exit
Destroy semaphore after join
This commit is contained in:
@@ -304,8 +304,8 @@ void btThreadSupportPosix::stopThreads()
|
|||||||
checkPThreadFunction(sem_post(threadStatus.startSemaphore));
|
checkPThreadFunction(sem_post(threadStatus.startSemaphore));
|
||||||
checkPThreadFunction(sem_wait(m_mainSemaphore));
|
checkPThreadFunction(sem_wait(m_mainSemaphore));
|
||||||
|
|
||||||
destroySem(threadStatus.startSemaphore);
|
|
||||||
checkPThreadFunction(pthread_join(threadStatus.thread, 0));
|
checkPThreadFunction(pthread_join(threadStatus.thread, 0));
|
||||||
|
destroySem(threadStatus.startSemaphore);
|
||||||
}
|
}
|
||||||
destroySem(m_mainSemaphore);
|
destroySem(m_mainSemaphore);
|
||||||
m_activeThreadStatus.clear();
|
m_activeThreadStatus.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user