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/include/zthread/ClassLockable.h | |
parent | 2d2f433b4de1c35b22aaf07854fc0ee11fcb350d (diff) | |
parent | f385747164c3fb278c92ef46fbd6c3da6590bbf0 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'dep/include/zthread/ClassLockable.h')
-rw-r--r-- | dep/include/zthread/ClassLockable.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/dep/include/zthread/ClassLockable.h b/dep/include/zthread/ClassLockable.h index a10fb4932a2..7c1eb0b5059 100644 --- a/dep/include/zthread/ClassLockable.h +++ b/dep/include/zthread/ClassLockable.h @@ -26,7 +26,7 @@ #include "zthread/CountedPtr.h" #include "zthread/Mutex.h" -namespace ZThread { +namespace ZThread { /** * @class ClassLockable @@ -43,25 +43,25 @@ namespace ZThread { static CountedPtr<LockType> _instance; CountedPtr<LockType> _lock; - public: - + public: + //! Create a ClassLockable - ClassLockable() - : _lock(_instance) {} - + ClassLockable() + : _lock(_instance) {} + //! acquire() the ClassLockable - virtual void acquire() { - _lock->acquire(); + virtual void acquire() { + _lock->acquire(); } //! tryAcquire() the ClassLockable virtual bool tryAcquire(unsigned long timeout) { - return _lock->tryAcquire(timeout); + return _lock->tryAcquire(timeout); } //! release() the ClassLockable virtual void release() { - _lock->release(); + _lock->release(); } }; |