Panda3D
Loading...
Searching...
No Matches
Public Member Functions | List of all members
LightReMutex Class Reference

A lightweight reentrant mutex. More...

#include "lightReMutex.h"

Inheritance diagram for LightReMutex:
LightReMutexDirect

Public Member Functions

 LightReMutex (const char *name)
 
 LightReMutex (const LightReMutex &copy)=delete
 
 LightReMutex (const std::string &name)
 
LightReMutexoperator= (const LightReMutex &copy)=delete
 
- Public Member Functions inherited from LightReMutexDirect
void acquire () const
 Grabs the lightReMutex if it is available.
 
void acquire (Thread *current_thread) const
 This variant on acquire() accepts the current thread as a parameter, if it is already known, as an optimization.
 
void clear_name ()
 The mutex name is only defined when compiling in DEBUG_THREADS mode.
 
bool debug_is_locked () const
 Returns true if the current thread has locked the LightReMutex, false otherwise.
 
void elevate_lock () const
 This method increments the lock count, assuming the calling thread already holds the lock.
 
std::string get_name () const
 The mutex name is only defined when compiling in DEBUG_THREADS mode.
 
bool has_name () const
 The mutex name is only defined when compiling in DEBUG_THREADS mode.
 
void lock ()
 Alias for acquire() to match C++11 semantics.
 
void output (std::ostream &out) const
 This method is declared virtual in MutexDebug, but non-virtual in LightReMutexDirect.
 
void release () const
 Releases the lightReMutex.
 
void set_name (const std::string &name)
 The mutex name is only defined when compiling in DEBUG_THREADS mode.
 
bool try_lock ()
 Alias for try_acquire() to match C++11 semantics.
 
void unlock ()
 Alias for release() to match C++11 semantics.
 

Detailed Description

A lightweight reentrant mutex.

See LightMutex and ReMutex.

This class inherits its implementation either from MutexDebug or LightReMutexDirect, depending on the definition of DEBUG_THREADS.

Definition at line 30 of file lightReMutex.h.

Constructor & Destructor Documentation

◆ LightReMutex() [1/3]

LightReMutex::LightReMutex ( )
inline

Definition at line 17 of file lightReMutex.I.

◆ LightReMutex() [2/3]

LightReMutex::LightReMutex ( const char * name)
inlineexplicit

Definition at line 29 of file lightReMutex.I.

◆ LightReMutex() [3/3]

LightReMutex::LightReMutex ( const std::string & name)
inlineexplicit

Definition at line 41 of file lightReMutex.I.


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