]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed deadlock when posting events from another thread to wxDFB (patch from #10408...
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 5 May 2009 16:09:40 +0000 (16:09 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 5 May 2009 16:09:40 +0000 (16:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/dfb/app.cpp

index 931a9bfbe3345fddc18b01e453d829c04b02c91b..0cc0506b3ff38401f0ead7899cb81a551b0f6ebc 100644 (file)
@@ -148,17 +148,9 @@ bool wxApp::SetDisplayMode(const wxVideoMode& mode)
 
 void wxApp::WakeUpIdle()
 {
-#if wxUSE_THREADS
-    if (!wxThread::IsMain())
-        wxMutexGuiEnter();
-#endif
-
+    // we don't need a mutex here, since we use the wxConsoleEventLoop
+    // and wxConsoleEventLoop::WakeUp() is thread-safe
     wxEventLoopBase * const loop = wxEventLoop::GetActive();
     if ( loop )
         loop->WakeUp();
-
-#if wxUSE_THREADS
-    if (!wxThread::IsMain())
-        wxMutexGuiLeave();
-#endif
 }