diff options
author | megamage <none@none> | 2009-02-12 17:09:15 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-12 17:09:15 -0600 |
commit | 6aee5fcbe7473a3cbac12b7e8482a7b98bef8be3 (patch) | |
tree | 91ec91d5c19eba9c2fe0e84b1c9dc7047a3de80e /dep/src/zthread/win32/FastRecursiveLock.h | |
parent | 2d2f433b4de1c35b22aaf07854fc0ee11fcb350d (diff) | |
parent | f385747164c3fb278c92ef46fbd6c3da6590bbf0 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'dep/src/zthread/win32/FastRecursiveLock.h')
-rw-r--r-- | dep/src/zthread/win32/FastRecursiveLock.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dep/src/zthread/win32/FastRecursiveLock.h b/dep/src/zthread/win32/FastRecursiveLock.h index e1a6e7cd692..de556ac4aa8 100644 --- a/dep/src/zthread/win32/FastRecursiveLock.h +++ b/dep/src/zthread/win32/FastRecursiveLock.h @@ -39,21 +39,21 @@ namespace ZThread { * @version 2.2.11 * * This FastRecursiveLock implementation is based on a Win32 Mutex - * object. This will perform better under high contention, + * object. This will perform better under high contention, * but will not be as fast as the spin lock under reasonable * circumstances. - */ + */ class FastRecursiveLock : private NonCopyable { HANDLE _hMutex; volatile unsigned int _count; public: - + /** * Create a new FastRecursiveLock */ - FastRecursiveLock() : _count(0) { + FastRecursiveLock() : _count(0) { _hMutex = ::CreateMutex(0, 0, 0); assert(_hMutex != NULL); @@ -62,12 +62,12 @@ class FastRecursiveLock : private NonCopyable { } - + ~FastRecursiveLock() { ::CloseHandle(_hMutex); } - + void acquire() { if(::WaitForSingleObject(_hMutex, INFINITE) != WAIT_OBJECT_0) { |