]> git.saurik.com Git - wxWidgets.git/commit - src/unix/threadpsx.cpp
Don't lock global mutex when deleting wxThread to avoid deadlocks.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Dec 2009 17:30:53 +0000 (17:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Dec 2009 17:30:53 +0000 (17:30 +0000)
commit2450225e87fa312300e72e82d14b1ca76c0b9d87
treeb7024ff4c0523fcdd5aa0c23ef8d49f5ff0d907c
parente5a1bd6409485a5fd2253f945caa2f1fb6ba589c
Don't lock global mutex when deleting wxThread to avoid deadlocks.

Calling out the user-defined wxThread dtor while holding gs_mutexDeleteThread
lock is a bad idea as it may result in deadlocks if the dtor deletes another
thread. Only lock the mutex directly before manipulating the data it protects.

Thanks to Neno Ganchev.

Closes #11501.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/unix/threadpsx.cpp