]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/threadpsx.cpp
Busy cursor don't need wxYield(), SendIdleEvents()
[wxWidgets.git] / src / unix / threadpsx.cpp
index b30021a122799480fbd6f9a00ca2dc77d2662cee..f0a19482a01340d443029899539ba8cc018a8cbb 100644 (file)
@@ -835,7 +835,9 @@ bool wxThread::IsMain()
 
 void wxThread::Yield()
 {
+#ifdef HAVE_SCHED_YIELD
     sched_yield();
+#endif
 }
 
 void wxThread::Sleep(unsigned long milliseconds)
@@ -1258,7 +1260,8 @@ wxThreadError wxThread::Kill()
 #if !HAVE_THREAD_CLEANUP_FUNCTIONS
                 ScheduleThreadForDeletion();
 
-                OnExit();
+                // don't call OnExit() here, it can only be called in the
+                // threads context and we're in the context of another thread
 
                 DeleteThread(this);
 #endif // HAVE_THREAD_CLEANUP_FUNCTIONS