#include <PhxLocks.h>
Public Member Functions | |
| Lock (bool recursive=false) | |
| Initializes a new lock this is initially unlocked. This lock will be non recursive by default. | |
| ~Lock () | |
| Destroys this lock. | |
| void | lock (void) const |
| Acquires the lock. | |
| void | unlock (void) const |
| Releases the lock. | |
| bool | isRecursive () |
A mutex is a simple lock that allows enforcement of mutually exclusive access to a piece of data. Only a single thread is allowed to hold the lock for any purpose at a given time.
|
|
Initializes a new lock this is initially unlocked. This lock will be non recursive by default.
|
|
|
Destroys this lock.
|
|
|
Acquires the lock. Calling this will lock this mutex. It will remain locked until unlock() is called. This forces all other threads requesting the lock to block. |
|
|
Releases the lock. Calling this will unlock this mutex, allowing another thread to acquire the lock if necessary. |
1.4.2