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

FX::FXMutexLock Class Reference

#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

Construct & lock associated mutex.

Destroy and unlock associated mutex.


Member Function Documentation

Return reference to associated mutex.

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

Lock mutex.

Return TRUE if succeeded locking the mutex.

Return TRUE if mutex is already locked.

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

Unlock mutex.

References FX::FXMutex::lock().

Copyright © 1997-2005 Jeroen van der Zijp