]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/threadpsx.cpp
Make wxDateTime::Tm::yday public and document it.
[wxWidgets.git] / src / unix / threadpsx.cpp
index 13ad80722e991bd2ffe95087d7caf4eee451e863..7e784e285f9a4e8fcea700ee40597a34f8cd32c6 100644 (file)
@@ -974,7 +974,17 @@ void wxThreadInternal::Wait()
     // if the thread we're waiting for is waiting for the GUI mutex, we will
     // deadlock so make sure we release it temporarily
     if ( wxThread::IsMain() )
+    {
+#ifdef __WXOSX__
+        // give the thread we're waiting for chance to do the GUI call
+        // it might be in, we don't do this conditionally as the to be waited on
+        // thread might have to acquire the mutex later but before terminating
+        if ( wxGuiOwnedByMainThread() )
+            wxMutexGuiLeave();
+#else
         wxMutexGuiLeave();
+#endif
+    }
 
     wxLogTrace(TRACE_THREADS,
                wxT("Starting to wait for thread %p to exit."),
@@ -1004,9 +1014,11 @@ void wxThreadInternal::Wait()
         }
     }
 
+#ifndef __WXOSX__
     // reacquire GUI mutex
     if ( wxThread::IsMain() )
         wxMutexGuiEnter();
+#endif
 }
 
 void wxThreadInternal::Pause()