aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mahogany/files/patch-include-MThread.h
blob: 66ef9db8aeb3e60109200b22a95941999635e9b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- include/MThread.h.orig  Wed Jul 23 00:01:38 2003
+++ include/MThread.h   Sun Oct  5 00:39:39 2003
@@ -19,8 +19,23 @@
 
 #if USE_THREADS
 
+#include "wx/thread.h"
+
 // use inheritance and not typedef to allow forward declaring it
-class MMutex : public wxMutex { };
+class MMutex : public wxMutex {
+public:
+    bool IsLocked() const {
+       if ( TryLock() == wxMUTEX_NO_ERROR )
+   {
+       Unlock();
+       return false;
+   }
+   else 
+   {
+       return true;
+   }
+    }
+};
 
 #else // !USE_THREADS