fesa-core  7.0.0
fesa::Lock Class Reference

This class is used to automatically lock and unlock a mutex. The constructor calls lock() and the destructor calls unlock(). This makes it impossible to leave a block containing a Lock object without unlocking the mutex. The mutex can also be unlocked explicitly, by calling the unlock() method. More...

#include <Lock.h>

Inherits noncopyable.

Public Member Functions

 Lock (const Mutex &m)
 Lock the associated mutex.
 
 ~Lock ()
 unlock the associated mutex
 
void unlock ()
 

Detailed Description

This class is used to automatically lock and unlock a mutex. The constructor calls lock() and the destructor calls unlock(). This makes it impossible to leave a block containing a Lock object without unlocking the mutex. The mutex can also be unlocked explicitly, by calling the unlock() method.

Member Function Documentation

void fesa::Lock::unlock ( )
inline

Unlocks the mutex.


The documentation for this class was generated from the following file: