#include <support/Autolock.h>
This is a convenience class that automatically releases a lock when the class is destroyed. Some synchronization classes supply their own autolockers (for example SLocker::Autolock) that are slightly more efficient. This class works with any synchronization object as lock as it returns lock_status_t from its locking operation.
Example usage:
void MyClass::MySynchronizedMethod() { SAutolock _l(m_lock.Lock()); ... }
Public Member Functions | |
bool | IsLocked () |
SAutolock () | |
SAutolock (const lock_status_t &status) | |
void | SetTo (const lock_status_t &status) |
void | Unlock () |
~SAutolock () |
|
|
|
|
|
|
|
|
|
|
|
|