diff options
Diffstat (limited to 'dep/include/zthread/FastMutex.h')
-rw-r--r-- | dep/include/zthread/FastMutex.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/dep/include/zthread/FastMutex.h b/dep/include/zthread/FastMutex.h index 1812c3e55a5..819108b377a 100644 --- a/dep/include/zthread/FastMutex.h +++ b/dep/include/zthread/FastMutex.h @@ -38,10 +38,10 @@ namespace ZThread { * * A FastMutex is a small fast implementation of a non-recursive, mutually exclusive * Lockable object. This implementation is a bit faster than the other Mutex classes - * as it involved the least overhead. However, this slight increase in speed is - * gained by sacrificing the robustness provided by the other classes. + * as it involved the least overhead. However, this slight increase in speed is + * gained by sacrificing the robustness provided by the other classes. * - * A FastMutex has the useful property of not being interruptable; that is to say + * A FastMutex has the useful property of not being interruptable; that is to say * that acquire() and tryAcquire() will not throw Interrupted_Exceptions. * * @see Mutex @@ -53,49 +53,49 @@ namespace ZThread { * <b>Error Checking</b> * * No error checking is performed, this means there is the potential for deadlock. - */ + */ class ZTHREAD_API FastMutex : public Lockable, private NonCopyable { - + FastLock* _lock; public: - + //! Create a FastMutex FastMutex(); - + //! Destroy a FastMutex virtual ~FastMutex(); - + /** - * Acquire exclusive access to the mutex. The calling thread will block until the + * Acquire exclusive access to the mutex. The calling thread will block until the * lock can be acquired. No safety or state checks are performed. - * + * * @pre The calling thread should <i>not</i> have previously acquired this lock. - * Deadlock will result if the same thread attempts to acquire the mutex more - * than once. + * Deadlock will result if the same thread attempts to acquire the mutex more + * than once. * * @post The calling thread obtains the lock successfully if no exception is thrown. * @exception Interrupted_Exception never thrown */ virtual void acquire(); - + /** * Release exclusive access. No safety or state checks are performed. - * + * * @pre the caller should have previously acquired this lock */ virtual void release(); - + /** - * Try to acquire exclusive access to the mutex. The calling thread will block until the + * Try to acquire exclusive access to the mutex. The calling thread will block until the * lock can be acquired. No safety or state checks are performed. - * + * * @pre The calling thread should <i>not</i> have previously acquired this lock. - * Deadlock will result if the same thread attempts to acquire the mutex more - * than once. + * Deadlock will result if the same thread attempts to acquire the mutex more + * than once. * * @param timeout unused - * @return + * @return * - <em>true</em> if the lock was acquired * - <em>false</em> if the lock was acquired * @@ -103,7 +103,7 @@ namespace ZThread { * @exception Interrupted_Exception never thrown */ virtual bool tryAcquire(unsigned long timeout); - + }; /* FastMutex */ }; |