Mutex which allows a timeout on locking.
More...
#include <arc/Thread.h>
|
bool | lock (int t=-1) |
| Lock mutex, but wait no longer than t milliseconds. More...
|
|
bool | trylock (void) |
| Returns true if mutex is currently locked, but does not attempt to acquire lock. More...
|
|
bool | unlock (void) |
| Release mutex. More...
|
|
void | forceReset (void) |
| This method is meant to be used only after fork. More...
|
|
Mutex which allows a timeout on locking.
◆ forceReset()
void Arc::TimedMutex::forceReset |
( |
void |
| ) |
|
|
inline |
This method is meant to be used only after fork.
It resets state of all internal locks and variables.
◆ lock()
bool Arc::TimedMutex::lock |
( |
int |
t = -1 | ) |
|
|
inline |
Lock mutex, but wait no longer than t milliseconds.
- Returns
- false if timeout occurred.
◆ trylock()
bool Arc::TimedMutex::trylock |
( |
void |
| ) |
|
|
inline |
Returns true if mutex is currently locked, but does not attempt to acquire lock.
◆ unlock()
bool Arc::TimedMutex::unlock |
( |
void |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: