Added wxCriticalSection::TryEnter() method.

This is similar to wxMutex::TryLock() and useful for the same reasons.

Closes #13638.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-12-01 14:22:15 +00:00
parent 4c5d5d633d
commit b9697cb410
6 changed files with 44 additions and 0 deletions

View File

@@ -584,6 +584,14 @@ public:
*/
void Enter();
/**
Try to enter the critical section (same as trying to lock a mutex).
If it can't, immediately returns false.
@since 2.9.3
*/
bool TryEnter();
/**
Leave the critical section allowing other threads use the global data
protected by it. There is no error return for this function.