H3DUtil::MutexLock Class Reference

Mutual exclusion lock class for synchronisation between threads. More...

#include <H3DUtil/Threads.h>

Inheritance diagram for H3DUtil::MutexLock:

Inheritance graph

List of all members.

Public Member Functions

 MutexLock ()
 Constructor.
 ~MutexLock ()
 Destructor.
void lock ()
 Locks the mutex.
void unlock ()
 Unlocks the mutex.
bool tryLock ()
 Try to lock the mutex, if the lock is not available false is returned.


Detailed Description

Mutual exclusion lock class for synchronisation between threads.

Most common usage is to make sure that only one thread enters a "critical section" at a time. E.g. if both threads uses the same variable we must put a lock around the access to make sure that two threads does not access it at once.


Member Function Documentation

void MutexLock::lock (  ) 


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

Generated on Fri Nov 7 10:23:44 2008 for H3DUtil by  doxygen 1.5.7