![]() |
http://www.sim.no http://www.coin3d.org |
#include <Inventor/threads/SbThreadAutoLock.h>
This class provides a simple convenience mechanism for automatically locking access to a function that is not re-entrant.
Usage example:
void myfunction(void) { SbThreadAutoLock lock(aMutexPtr); // [other code] }
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.
Public Member Functions | |
SbThreadAutoLock (SbMutex *mutexptr) | |
~SbThreadAutoLock () | |
Protected Attributes | |
SbMutex * | mutex |
|
The constructor calls SbMutex::lock() on mutex. |
|
The destructor calls SbMutex::unlock() on the mutex passed in as a parameter to the constructor. |
|
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. |
Copyright © 1998-2005 by Systems in Motion AS. All rights reserved.
Generated on Wed May 31 00:48:43 2006 for Coin by Doxygen. 1.4.4