X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/827833e2e270012069312431aadaf58096286329..abd474ea63667f727940a009cc3e0b23ba9f418f:/src/unix/threadpsx.cpp?ds=sidebyside diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 7e784e285f..22fefee76d 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -1425,7 +1425,7 @@ wxThreadError wxThread::Resume() // exiting thread // ----------------------------------------------------------------------------- -wxThread::ExitCode wxThread::Wait() +wxThread::ExitCode wxThread::Wait(wxThreadWait WXUNUSED(waitMode)) { wxCHECK_MSG( This() != this, (ExitCode)-1, wxT("a thread can't wait for itself") ); @@ -1438,7 +1438,7 @@ wxThread::ExitCode wxThread::Wait() return m_internal->GetExitCode(); } -wxThreadError wxThread::Delete(ExitCode *rc) +wxThreadError wxThread::Delete(ExitCode *rc, wxThreadWait WXUNUSED(waitMode)) { wxCHECK_MSG( This() != this, wxTHREAD_MISC_ERROR, wxT("a thread can't delete itself") ); @@ -1453,6 +1453,8 @@ wxThreadError wxThread::Delete(ExitCode *rc) m_critsect.Leave(); + OnDelete(); + switch ( state ) { case STATE_NEW: @@ -1487,10 +1489,10 @@ wxThreadError wxThread::Delete(ExitCode *rc) } //else: can't wait for detached threads } - + if (state == STATE_NEW) return wxTHREAD_MISC_ERROR; - // for coherency with the MSW implementation, signal the user that + // for coherency with the MSW implementation, signal the user that // Delete() was called on a thread which didn't start to run yet. return wxTHREAD_NO_ERROR; @@ -1501,6 +1503,8 @@ wxThreadError wxThread::Kill() wxCHECK_MSG( This() != this, wxTHREAD_MISC_ERROR, wxT("a thread can't kill itself") ); + OnKill(); + switch ( m_internal->GetState() ) { case STATE_NEW: