diff --git a/src/msw/thread.cpp b/src/msw/thread.cpp index 576f756780..86bd337e1b 100644 --- a/src/msw/thread.cpp +++ b/src/msw/thread.cpp @@ -1116,6 +1116,12 @@ wxThreadError wxThread::Kill() { delete this; } + else // joinable + { + // update the status of the joinable thread + wxCriticalSectionLocker lock(m_critsect); + m_internal->SetState(STATE_EXITED); + } return wxTHREAD_NO_ERROR; } @@ -1128,6 +1134,12 @@ void wxThread::Exit(ExitCode status) { delete this; } + else // joinable + { + // update the status of the joinable thread + wxCriticalSectionLocker lock(m_critsect); + m_internal->SetState(STATE_EXITED); + } #ifdef wxUSE_BEGIN_THREAD _endthreadex((unsigned)status);