Add missing critical section locking before accessing shared variable.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 4 Dec 2012 00:39:33 +0000 (00:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 4 Dec 2012 00:39:33 +0000 (00:39 +0000)
commit3fb8a2bcfb362fa35dadd142b0569059a784fbb3
tree5583a00f478478df723d77c538fd204cbae792dc
parent55fd62c1e370bef69657f220ddd591743e842be8
Add missing critical section locking before accessing shared variable.

WinThreadStart() in wxMSW wxThread implementation accessed the variable
containing the thread state without locking which was wrong, do it only inside
the critical section.

Notice that there is still an unavoidable race condition between exiting the
thread and starting it, so it's not clear at all if we should try to avoid
calling DoThreadStart() here.

Closes #14865.

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