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:
@@ -1116,6 +1116,12 @@ wxThreadError wxThread::Kill()
|
|||||||
{
|
{
|
||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
|
else // joinable
|
||||||
|
{
|
||||||
|
// update the status of the joinable thread
|
||||||
|
wxCriticalSectionLocker lock(m_critsect);
|
||||||
|
m_internal->SetState(STATE_EXITED);
|
||||||
|
}
|
||||||
|
|
||||||
return wxTHREAD_NO_ERROR;
|
return wxTHREAD_NO_ERROR;
|
||||||
}
|
}
|
||||||
@@ -1128,6 +1134,12 @@ void wxThread::Exit(ExitCode status)
|
|||||||
{
|
{
|
||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
|
else // joinable
|
||||||
|
{
|
||||||
|
// update the status of the joinable thread
|
||||||
|
wxCriticalSectionLocker lock(m_critsect);
|
||||||
|
m_internal->SetState(STATE_EXITED);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef wxUSE_BEGIN_THREAD
|
#ifdef wxUSE_BEGIN_THREAD
|
||||||
_endthreadex((unsigned)status);
|
_endthreadex((unsigned)status);
|
||||||
|
Reference in New Issue
Block a user