![]() |
http://www.sim.no http://www.coin3d.org |
Simple convenience class for locking access to a function.This class provides a simple convenience mechanism for automatically locking access to a function that is not re-entrant. More...
#include <Inventor/threads/SbThreadAutoLock.h>
Public Member Functions | |
SbThreadAutoLock (SbMutex *mutexptr) | |
~SbThreadAutoLock () | |
Protected Attributes | |
SbMutex * | mutex |
Simple convenience class for locking access to a function.
This class provides a simple convenience mechanism for automatically locking access to a function that is not re-entrant.
Usage example:
In the class constructor, SbMutex::lock() is called on the mutex, and when the function exits (this is the convenience part) the destructor will automatically be invoked, calling SbMutex::unlock() on the same mutex.
|
inline |
The constructor calls SbMutex::lock() on mutex.
The constructor calls SbThreadMutex::lock() on mutex.
References SbMutex::lock().
|
inline |
The destructor calls unlock() on the mutex passed in as a parameter to the constructor.
References SbMutex::unlock().
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Fri Feb 17 2017 for Coin by Doxygen. 1.8.13