Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXMutexLock Class Reference

An easy way to establish a correspondence between a C++ scope and a critical section is to simply declare an FXMutexLock at the beginning of the scope. More...

#include <FXThread.h>

List of all members.

Public Member Functions

 FXMutexLock (FXMutex &m)
FXMutexmutex ()
void lock ()
FXbool trylock ()
FXbool locked ()
void unlock ()
 ~FXMutexLock ()


Detailed Description

An easy way to establish a correspondence between a C++ scope and a critical section is to simply declare an FXMutexLock at the beginning of the scope.

The mutex will be automatically released when the scope is left (either by natural means or by means of an exception.


Constructor & Destructor Documentation

FX::FXMutexLock::FXMutexLock FXMutex m  )  [inline]
 

Construct & lock associated mutex.

FX::FXMutexLock::~FXMutexLock  )  [inline]
 

Destroy and unlock associated mutex.


Member Function Documentation

FXMutex& FX::FXMutexLock::mutex  )  [inline]
 

Return reference to associated mutex.

void FX::FXMutexLock::lock  )  [inline]
 

Lock mutex.

FXbool FX::FXMutexLock::trylock  )  [inline]
 

Return TRUE if succeeded locking the mutex.

FXbool FX::FXMutexLock::locked  )  [inline]
 

Return TRUE if mutex is already locked.

void FX::FXMutexLock::unlock  )  [inline]
 

Unlock mutex.

Copyright © 1997-2005 Jeroen van der Zijp