]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/thread.cpp
Update version to 2.9.4 in version.bkl too and rebake everything.
[wxWidgets.git] / src / osx / carbon / thread.cpp
index db0a03d9b76a8b1febc8a43475bc9ec214889904..429bf44ee44414ef01fd12f1acd18f23d1eb64db 100644 (file)
@@ -121,6 +121,11 @@ void wxCriticalSection::Enter()
     MPEnterCriticalRegion( (MPCriticalRegionID) m_critRegion, kDurationForever );
 }
 
+bool wxCriticalSection::TryEnter()
+{
+    return MPEnterCriticalRegion( (MPCriticalRegionID) m_critRegion, kDurationImmediate ) == noErr;
+}
+
 void wxCriticalSection::Leave()
 {
     MPExitCriticalRegion( (MPCriticalRegionID) m_critRegion );