]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't use wxCriticalSection in wxWakeUpPipeMT if wxUSE_THREADS==0.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 14 Jul 2013 11:34:27 +0000 (11:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 14 Jul 2013 11:34:27 +0000 (11:34 +0000)
In fact, don't define wxWakeUpPipeMT class at all when not using threads.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/unix/private/wakeuppipe.h

index df90d52025b7c306289883bd694b5d1e489160af..23bcf12912f1f3a0aed639d0daff324477fd743e 100644 (file)
@@ -65,6 +65,7 @@ private:
 
 // This class can be used from multiple threads, i.e. its WakeUp() can be
 // called concurrently.
+#if wxUSE_THREADS
 
 class wxWakeUpPipeMT : public wxWakeUpPipe
 {
@@ -92,4 +93,10 @@ private:
     wxCriticalSection m_pipeLock;
 };
 
+#else // !wxUSE_THREADS
+
+typedef wxWakeUpPipe wxWakeUpPipeMT;
+
+#endif // wxUSE_THREADS/!wxUSE_THREADS
+
 #endif // _WX_UNIX_PRIVATE_WAKEUPPIPE_H_