X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5b65f1364d1a643940ddd31fbd77578ff6e20639..f9204363853f23d27792e9bb061505f970aed0c7:/src/unix/threadpsx.cpp diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 429b2a292c..e8aad25e50 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -37,6 +37,7 @@ #include "wx/intl.h" #include "wx/dynarray.h" #include "wx/timer.h" +#include "wx/stopwatch.h" #include #include @@ -678,7 +679,7 @@ public: private: pthread_t m_threadId; // id of the thread wxThreadState m_state; // see wxThreadState enum - int m_prio; // in wxWindows units: from 0 to 100 + int m_prio; // in wxWidgets units: from 0 to 100 // this flag is set when the thread should terminate bool m_cancelled; @@ -969,7 +970,7 @@ void wxThread::Yield() void wxThread::Sleep(unsigned long milliseconds) { - wxUsleep(milliseconds); + wxMilliSleep(milliseconds); } int wxThread::GetCPUCount() @@ -1483,6 +1484,12 @@ void wxThread::Exit(ExitCode status) // only call one thread function at a time :-( DeleteThread(this); } + else + { + m_critsect.Enter(); + m_internal->SetState(STATE_EXITED); + m_critsect.Leave(); + } // terminate the thread (pthread_exit() never returns) pthread_exit(status);