| Yate
    | 
#include <yateclass.h>
| Public Member Functions | |
| WLock (RWLock &lck, long maxWait=-1) | |
| WLock (RWLock *lck, long maxWait=-1) | |
| ~WLock () | |
| 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::writeLock().
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::writeLock().
| 
 | 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::writeLock().
| 
 | 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