Panda3D
|
This is a standard, non-reentrant mutex, similar to the Mutex class. More...
#include "lightMutex.h"
Public Member Functions | |
LightMutex (const char *name) | |
LightMutex (const string &name) |
This is a standard, non-reentrant mutex, similar to the Mutex class.
It is different from Mutex in the case of SIMPLE_THREADS: in this case, the LightMutex class compiles to nothing; it performs no locking whatsoever. It is therefore useful only to protect very small sections of code, during which you are confident there will be no thread yields.
In the normal, system-threaded implementation, this class is exactly the same as Mutex.
ConditionVars cannot be used with LightMutex; they work only with Mutex.
This class inherits its implementation either from MutexDebug or LightMutexDirect, depending on the definition of DEBUG_THREADS.
Definition at line 45 of file lightMutex.h.