BASE::RCAutoFreeMutex Class Reference

Automized locking and unlocking of an RCMutex. More...

Collaboration diagram for BASE::RCAutoFreeMutex:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RCAutoFreeMutex (volatile RCMutex &Mutex)

Detailed Description

Automized locking and unlocking of an RCMutex.

Author:
Patrik Stellmann
This class is designed to simplifie it making a piece of code threadsafe. If you want a function to be accessed only once at a time simply create a variable of this type passing a mutex to the constructor. The constructor will call the lock-function of the mutex and the destructor being called when the function is left will call th unlock-function. This way has also the advantage over an explicite call of Lock and Unlock that the mutex is even unlocked if teh functionis left due to an exception.


The documentation for this class was generated from the following file:
Generated on Thu Feb 16 12:46:22 2006 for Simulator Bob by  doxygen 1.4.6-NO