fix for IsAlive() called after Kill() or Exit()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-07-10 16:23:42 +00:00
parent df6f82f048
commit 57fd9bb239

View File

@ -1116,6 +1116,12 @@ wxThreadError wxThread::Kill()
{
delete this;
}
else // joinable
{
// update the status of the joinable thread
wxCriticalSectionLocker lock(m_critsect);
m_internal->SetState(STATE_EXITED);
}
return wxTHREAD_NO_ERROR;
}
@ -1128,6 +1134,12 @@ void wxThread::Exit(ExitCode status)
{
delete this;
}
else // joinable
{
// update the status of the joinable thread
wxCriticalSectionLocker lock(m_critsect);
m_internal->SetState(STATE_EXITED);
}
#ifdef wxUSE_BEGIN_THREAD
_endthreadex((unsigned)status);