diff options
author | erwincoumans <erwin.coumans@gmail.com> | 2019-06-10 19:24:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-10 19:24:28 -0400 |
commit | 5ec8339b6fc491e3f09a34a4516e82787f053fcc (patch) | |
tree | fc0a68d57813038de6893d857152be217295a901 | |
parent | 9457646737c4bff3c8ec9f5e93fadff705ef2eef (diff) | |
parent | 50dca7cf0ee2b15ea5c9d406d99a73f33bc77711 (diff) | |
download | bullet3-5ec8339b6fc491e3f09a34a4516e82787f053fcc.tar.gz |
Merge pull request #2270 from jamoflaw/deadlock-on-exit
Destroy semaphore after join
-rw-r--r-- | src/LinearMath/TaskScheduler/btThreadSupportPosix.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/LinearMath/TaskScheduler/btThreadSupportPosix.cpp b/src/LinearMath/TaskScheduler/btThreadSupportPosix.cpp index d80af09c7..a03f6dc57 100644 --- a/src/LinearMath/TaskScheduler/btThreadSupportPosix.cpp +++ b/src/LinearMath/TaskScheduler/btThreadSupportPosix.cpp @@ -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(); |