Equalizer 1.0
|
A lock (mutex) primitive. More...
#include <lock.h>
Public Member Functions | |
COBASE_API | Lock () |
Construct a new lock. | |
COBASE_API | ~Lock () |
Destruct the lock. | |
COBASE_API void | set () |
Acquire the lock. | |
COBASE_API void | unset () |
Release the lock. | |
COBASE_API bool | trySet () |
Attempt to acquire the lock. | |
COBASE_API bool | isSet () |
Test if the lock is set. |
COBASE_API co::base::Lock::Lock | ( | ) |
Construct a new lock.
COBASE_API co::base::Lock::~Lock | ( | ) |
Destruct the lock.
COBASE_API bool co::base::Lock::isSet | ( | ) |
Test if the lock is set.
true
if the lock is set, false
if it is not set. COBASE_API void co::base::Lock::set | ( | ) |
Acquire the lock.
Referenced by co::Connection::lockSend().
COBASE_API bool co::base::Lock::trySet | ( | ) |
Attempt to acquire the lock.
This method implements an atomic test-and-set operation.
true
if the lock was set, false
if it was not set. COBASE_API void co::base::Lock::unset | ( | ) |
Release the lock.
Referenced by co::Connection::unlockSend().