Yate
|
#include <yateclass.h>
Public Member Functions | |
RLock (RWLock &lck, long maxWait=-1) | |
RLock (RWLock *lck, long maxwait=-1) | |
~RLock () | |
RWLock * | locked () const |
void | drop () |
bool | acquire (RWLock *lck, long maxwait=-1) |
bool | acquire (RWLock &lck, long maxwait=-1) |
Ephemeral read lock on a read-write lock (stack allocated lock that is locked on creation and unlocked in destructor
Create the lock, try to lock the object
lck | Reference to the object to lock |
maxWait | Time in microseconds to wait, -1 wait forever |
References RWLock::readLock().
Create the lock, try to lock the object
lck | Pointer to the object to lock |
maxwait | Time in microseconds to wait, -1 wait forever |
References RWLock::readLock().
|
inline |
Destroy the lock, unlock the mutex if it was locked
|
inline |
Attempt to acquire a new lock on another object
lck | Reference to the object to lock |
maxwait | Time in microseconds to wait, -1 wait forever |
|
inline |
Attempt to acquire a new lock on another object
lck | Pointer to the object to lock |
maxwait | Time in microseconds to wait, -1 wait forever |
References RWLock::readLock().
|
inline |
Unlock the object if it was locked and drop the reference to it
|
inline |
Return a pointer to the lockable object this lock holds