Structural deformable models
Public Member Functions | List of all members
vuLock Class Reference

#include <vuThread.h>

Public Member Functions

 vuLock (vuMutex &m)
 
 ~vuLock ()
 

Detailed Description

Using this class to trigger a mutex prevents from forgetting unlock(). Usage: { vuLock l(mutex); ... do stuff ...; }

Definition at line 60 of file vuThread.h.

Constructor & Destructor Documentation

vuLock::vuLock ( vuMutex m)
inline

locks vuMutex m.

Definition at line 63 of file vuThread.h.

63  : lmutex(&m) {
64  lmutex->lock();
65  }
void lock()
Definition: vuThread.cpp:138
vuLock::~vuLock ( )
inline

unlocks the mutex upon destruction

Definition at line 67 of file vuThread.h.

67  {
68  lmutex->unlock();
69  }
void unlock()
Definition: vuThread.cpp:148

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