#include <FastRecursiveMutex.h>

Public Member Functions | |
FastRecursiveMutex () | |
Create a new FastRecursiveMutex. | |
virtual | ~FastRecursiveMutex () |
Destroy this FastRecursiveMutex. | |
virtual void | acquire () |
virtual void | release () |
virtual bool | tryAcquire (unsigned long timeout) |
![]() | |
virtual | ~Lockable () |
Destroy a Lockable object. | |
virtual void | acquire ()=0 |
virtual bool | tryAcquire (unsigned long timeout)=0 |
virtual void | release ()=0 |
Detailed Description
- Date
- <2003-07-19T19:00:25-0400>
- Version
- 2.2.0
A FastRecursiveMutex is a small fast implementation of a recursive, mutally 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.
A FastRecursiveMutex has the useful property of not being interruptable; that is to say
that acquire() and tryAcquire() will not throw Interrupted_Exceptions.
- See also
- RecursiveMutex
Scheduling
Scheduling is left to the operating systems and may vary.
Error Checking
No error checking is performed, this means there is the potential for deadlock.
Member Function Documentation
◆ acquire()
|
virtual |
Acquire exclusive access to the mutex. The calling thread will block until the lock can be acquired. No safety or state checks are performed. The calling thread may acquire the mutex nore than once.
- Postcondition
- The calling thread obtains the lock successfully if no exception is thrown.
- Exceptions
-
Interrupted_Exception never thrown
Implements Lockable.
◆ release()
|
virtual |
Release access. No safety or state checks are performed.
- Precondition
- the caller should have previously acquired this lock at least once.
Implements Lockable.
◆ tryAcquire()
|
virtual |
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. The calling thread may acquire the mutex more than once.
- Parameters
-
timeout unused
- Returns
- true if the lock was acquired
- false if the lock was acquired
- Postcondition
- The calling thread obtains the lock successfully if no exception is thrown.
- Exceptions
-
Interrupted_Exception never thrown
Implements Lockable.
The documentation for this class was generated from the following file:
- FastRecursiveMutex.h