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:
parent
df6f82f048
commit
57fd9bb239
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user