Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::threads::ScopedMutex Class Reference

A class that locks a mutex upon construction and unlocks it upon destruction. More...

#include <omScopedMutex.h>

Public Member Functions

 ScopedMutex (Mutex &newMutex)
 Create a new scoped mutex that locks the specified mutex. More...
 
 ~ScopedMutex ()
 Unlock the scoped mutex's mutex. More...
 

Detailed Description

A class that locks a mutex upon construction and unlocks it upon destruction.

This class can be used to ensure that a mutex that is locked at the beginning of a function will be automatically unlocked for each return path.

Constructor & Destructor Documentation

om::threads::ScopedMutex::ScopedMutex ( Mutex newMutex)
inline

Create a new scoped mutex that locks the specified mutex.

om::threads::ScopedMutex::~ScopedMutex ( )
inline

Unlock the scoped mutex's mutex.


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