Equalizer 1.0
|
A mutex with timeout capabilities. More...
#include <timedLock.h>
Public Member Functions | |
COBASE_API | TimedLock () |
Construct a new timed lock. | |
COBASE_API | ~TimedLock () |
Destruct the lock. | |
COBASE_API bool | set (const uint32_t timeout=EQ_TIMEOUT_INDEFINITE) |
Set the lock. | |
COBASE_API void | unset () |
Release the lock. | |
COBASE_API bool | trySet () |
Attempt to set the lock. | |
bool | isSet () |
Test if the lock is set. |
A mutex with timeout capabilities.
Definition at line 31 of file timedLock.h.
COBASE_API co::base::TimedLock::TimedLock | ( | ) |
Construct a new timed lock.
COBASE_API co::base::TimedLock::~TimedLock | ( | ) |
Destruct the lock.
bool co::base::TimedLock::isSet | ( | ) | [inline] |
Test if the lock is set.
Definition at line 68 of file timedLock.h.
COBASE_API bool co::base::TimedLock::set | ( | const uint32_t | timeout = EQ_TIMEOUT_INDEFINITE | ) |
Set the lock.
timeout | the timeout in milliseconds to wait for the lock, or EQ_TIMEOUT_INDEFINITE to wait indefinitely. |
COBASE_API bool co::base::TimedLock::trySet | ( | ) |
Attempt to set the lock.
COBASE_API void co::base::TimedLock::unset | ( | ) |
Release the lock.