defer Terminating the Task until it is really done

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2004-05-19 14:38:12 +00:00
parent a7a5165ca7
commit 5efd525f9f

View File

@ -1465,7 +1465,7 @@ void wxThread::Exit(ExitCode status)
// m_critsect on us (almost all of them do)
OnExit();
MPTerminateTask( m_internal->GetId() , (long) status) ;
MPTaskID threadid = m_internal->GetId() ;
if ( IsDetached() )
{
@ -1477,6 +1477,7 @@ void wxThread::Exit(ExitCode status)
wxCriticalSectionLocker lock(m_critsect);
m_internal->SetState(STATE_EXITED);
}
MPTerminateTask( threadid , (long) status) ;
}
// also test whether we were paused