#include <RWLock.h>
Public Member Functions | |
bool | readLock () |
bool | readLock (const ::icl_core::TimeStamp &timeout) |
bool | readLock (const ::icl_core::TimeSpan &timeout) |
RWLock () | |
bool | tryReadLock () |
bool | tryWriteLock () |
void | unlock () |
bool | writeLock () |
bool | writeLock (const ::icl_core::TimeStamp &timeout) |
bool | writeLock (const ::icl_core::TimeSpan &timeout) |
virtual | ~RWLock () |
Private Attributes | |
RWLockImpl * | m_impl |
Additional Inherited Members | |
Protected Member Functions inherited from icl_core::Noncopyable | |
Noncopyable () | |
virtual | ~Noncopyable () |
icl_core::thread::RWLock::RWLock | ( | ) |
Creates a read/write lock.
Definition at line 46 of file RWLock.cpp.
|
virtual |
Destroys a read/write lock.
Definition at line 78 of file RWLock.cpp.
bool icl_core::thread::RWLock::readLock | ( | ) |
Tries to get a shared read lock on the RWLock.
true
if locking succeeds, or false
on a timeout or every other failure. Definition at line 85 of file RWLock.cpp.
bool icl_core::thread::RWLock::readLock | ( | const ::icl_core::TimeStamp & | timeout | ) |
Tries to get a shared read lock on the RWLock with an absolute timeout. The function may then return with false
if the absolute time passes without being able to lock the RWLock.
Definition at line 94 of file RWLock.cpp.
bool icl_core::thread::RWLock::readLock | ( | const ::icl_core::TimeSpan & | timeout | ) |
Tries to get a shared read lock on the RWLock with a relative timeout. The function may then return with false
if the relative time passes without being able to lock the RWLock.
Definition at line 104 of file RWLock.cpp.
bool icl_core::thread::RWLock::tryReadLock | ( | ) |
Tries to get a shared read lock on the RWLock without blocking. The mutex is locked if it is available.
true
if the RWLock has been locked, false
otherwise. Definition at line 114 of file RWLock.cpp.
bool icl_core::thread::RWLock::tryWriteLock | ( | ) |
Tries to get a shared write lock on the RWLock without blocking. The RWLock is locked if it is available.
true
if the RWLock has been locked, false
otherwise. Definition at line 152 of file RWLock.cpp.
void icl_core::thread::RWLock::unlock | ( | ) |
Releases a shared read or write lock on the RWLock.
Definition at line 161 of file RWLock.cpp.
bool icl_core::thread::RWLock::writeLock | ( | ) |
Tries to get a shared write lock on the RWLock.
true
if locking succeeds, or false
on a timeout or every other failure. Definition at line 123 of file RWLock.cpp.
bool icl_core::thread::RWLock::writeLock | ( | const ::icl_core::TimeStamp & | timeout | ) |
Tries to get a shared write lock on the RWLock with an absolute timeout. The function may then return with false
if the absolute time passes without being able to lock the RWLock.
Definition at line 132 of file RWLock.cpp.
bool icl_core::thread::RWLock::writeLock | ( | const ::icl_core::TimeSpan & | timeout | ) |
Tries to get a shared write lock on the RWLock with a relative timeout. The function may then return with false
if the relative time passes without being able to lock the RWLock.
Definition at line 142 of file RWLock.cpp.
|
private |