eq::base::Lock Class Reference
#include <lock.h>
List of all members.
Detailed Description
A lock (mutex) primitive.
Definition at line 19 of file lock.h.
|
Public Member Functions |
|
| Lock () |
| | Constructs a new lock.
|
| | ~Lock () |
| | Destructs the lock.
|
|
void | set () |
| | Sets the lock.
|
|
void | unset () |
| | Releases the lock.
|
| bool | trySet () |
| | Attempts to set the lock.
|
| bool | test () |
| | Tests if the lock is set.
|
Constructor & Destructor Documentation
| eq::base::Lock::~Lock |
( |
|
) |
|
Destructs the lock.
Definition at line 46 of file lock.cpp.
Member Function Documentation
| bool eq::base::Lock::trySet |
( |
|
) |
|
Attempts to set the lock.
- Returns:
true if the lock was set, false if it was not set.
Definition at line 77 of file lock.cpp.
Referenced by test().
| bool eq::base::Lock::test |
( |
|
) |
|
Tests if the lock is set.
- Returns:
true if the lock is set, false if it is not set.
Definition at line 87 of file lock.cpp.
References trySet(), and unset().
The documentation for this class was generated from the following files: