diff options
Diffstat (limited to 'dep/src/zthread/win32/FastLock.h')
-rw-r--r-- | dep/src/zthread/win32/FastLock.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/dep/src/zthread/win32/FastLock.h b/dep/src/zthread/win32/FastLock.h index 2e9fe829af6..3b212e1d891 100644 --- a/dep/src/zthread/win32/FastLock.h +++ b/dep/src/zthread/win32/FastLock.h @@ -39,10 +39,10 @@ namespace ZThread { * @version 2.2.11 * * This FastLock 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 FastLock : private NonCopyable { HANDLE _hMutex; @@ -51,11 +51,11 @@ namespace ZThread { #endif public: - + /** * Create a new FastLock */ - FastLock() { + FastLock() { #ifndef NDEBUG _locked = false; @@ -68,11 +68,11 @@ namespace ZThread { } - + ~FastLock() { ::CloseHandle(_hMutex); } - + void acquire() { if(::WaitForSingleObject(_hMutex, INFINITE) != WAIT_OBJECT_0) { @@ -113,7 +113,7 @@ namespace ZThread { switch(::WaitForSingleObject(_hMutex, timeout)) { case WAIT_OBJECT_0: - + #ifndef NDEBUG // Simulate deadlock to provide consistent behavior. This @@ -122,7 +122,7 @@ namespace ZThread { while(_locked) ThreadOps::yield(); - + _locked = true; #endif |