Scopira
20080306
|
#include <mutex_pthreads.h>
Public Member Functions | |
locker (mutex &mut) | |
~locker () | |
locker (mutex &mut) | |
~locker () | |
This automatic variable locks and unllocks mutexs on construction and destruction. This is for auto-pointer like critical sections in scope blocks and makes sur eyou don't forget to unlock a mutex on ALL scope block exits.
|
inline |
Locks the given mutex on construction.
References scopira::tool::mutex::lock().
|
inline |
Unlocks the mutex on destruction.
References scopira::tool::mutex::unlock().
|
inline |
Locks the given mutex on construction.
References scopira::tool::mutex::lock().
|
inline |
Unlocks the mutex on destruction.
References scopira::tool::mutex::unlock().