14#ifndef LIGHTREMUTEXDIRECT_H
15#define LIGHTREMUTEXDIRECT_H
29class EXPCL_PANDA_PIPELINE LightReMutexDirect {
31 LightReMutexDirect() =
default;
32 LightReMutexDirect(
const LightReMutexDirect ©) =
delete;
33 ~LightReMutexDirect() =
default;
35 void operator = (
const LightReMutexDirect ©) =
delete;
43 BLOCKING INLINE
void acquire()
const;
50 INLINE
void set_name(
const std::string &name);
55 void output(std::ostream &out)
const;
58#ifdef HAVE_REMUTEXTRUEIMPL
59 mutable ReMutexTrueImpl _impl;
This class implements a standard lightReMutex by making direct calls to the underlying implementation...
void set_name(const std::string &name)
The mutex name is only defined when compiling in DEBUG_THREADS mode.
void acquire() const
Grabs the lightReMutex if it is available.
void clear_name()
The mutex name is only defined when compiling in DEBUG_THREADS mode.
std::string get_name() const
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 output(std::ostream &out) const
This method is declared virtual in MutexDebug, but non-virtual in LightReMutexDirect.
bool try_lock()
Alias for try_acquire() to match C++11 semantics.
void elevate_lock() const
This method increments the lock count, assuming the calling thread already holds the lock.
void unlock()
Alias for release() to match C++11 semantics.
void release() const
Releases the lightReMutex.
void lock()
Alias for acquire() to match C++11 semantics.
bool has_name() const
The mutex name is only defined when compiling in DEBUG_THREADS mode.
This class implements a standard reMutex by making direct calls to the underlying implementation laye...
A thread; that is, a lightweight process.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.