From 5efd525f9fd898ad39aea91fab5c6e4b933d6721 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 19 May 2004 14:38:12 +0000 Subject: [PATCH] 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 --- src/mac/carbon/thread.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mac/carbon/thread.cpp b/src/mac/carbon/thread.cpp index c5ba83d648..fed5af4d81 100644 --- a/src/mac/carbon/thread.cpp +++ b/src/mac/carbon/thread.cpp @@ -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