X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f48a115976827701bb7b4bab7333f7512de08ab2..cc3977bf132d40cb66c6b488890ef67a396d4a0a:/src/msw/thread.cpp?ds=sidebyside diff --git a/src/msw/thread.cpp b/src/msw/thread.cpp index 53c192cc50..30f9bca117 100644 --- a/src/msw/thread.cpp +++ b/src/msw/thread.cpp @@ -686,6 +686,8 @@ bool wxThreadInternal::Create(wxThread *thread, unsigned int stackSize) wxThreadError wxThreadInternal::Kill() { + m_thread->OnKill(); + if ( !::TerminateThread(m_hThread, THREAD_ERROR_EXIT) ) { wxLogSysError(_("Couldn't terminate thread")); @@ -759,6 +761,8 @@ wxThreadInternal::WaitForTerminate(wxCriticalSection& cs, Cancel(); } + if ( threadToDelete ) + threadToDelete->OnDelete(); // now wait for thread to finish if ( wxThread::IsMain() )