]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/thread.cpp
bracketing msw enhanced metafile usage
[wxWidgets.git] / src / msw / thread.cpp
index 53c192cc5014d0f54468e1da065174ca61369f2d..30f9bca117df89ad09d8181a7268097b10177199 100644 (file)
@@ -686,6 +686,8 @@ bool wxThreadInternal::Create(wxThread *thread, unsigned int stackSize)
 
 wxThreadError wxThreadInternal::Kill()
 {
 
 wxThreadError wxThreadInternal::Kill()
 {
+    m_thread->OnKill();
+
     if ( !::TerminateThread(m_hThread, THREAD_ERROR_EXIT) )
     {
         wxLogSysError(_("Couldn't terminate thread"));
     if ( !::TerminateThread(m_hThread, THREAD_ERROR_EXIT) )
     {
         wxLogSysError(_("Couldn't terminate thread"));
@@ -759,6 +761,8 @@ wxThreadInternal::WaitForTerminate(wxCriticalSection& cs,
         Cancel();
     }
 
         Cancel();
     }
 
+    if ( threadToDelete )
+        threadToDelete->OnDelete();
 
     // now wait for thread to finish
     if ( wxThread::IsMain() )
 
     // now wait for thread to finish
     if ( wxThread::IsMain() )