30class EXPCL_PANDA_PIPELINE MutexDirect {
32 MutexDirect() =
default;
33 MutexDirect(
const MutexDirect ©) =
delete;
34 ~MutexDirect() =
default;
36 void operator = (
const MutexDirect ©) =
delete;
44 BLOCKING INLINE
void acquire()
const;
49 INLINE
void set_name(
const std::string &name);
54 void output(std::ostream &out)
const;
57 mutable MutexTrueImpl _impl;
59 friend class ConditionVarDirect;
60 friend class ConditionVarFullDirect;
64operator << (std::ostream &out,
const MutexDirect &m) {
This class implements a standard mutex by making direct calls to the underlying implementation layer.
std::string get_name() const
The mutex name is only defined when compiling in DEBUG_THREADS mode.
void set_name(const std::string &name)
The mutex name is only defined when compiling in DEBUG_THREADS mode.
void output(std::ostream &out) const
This method is declared virtual in MutexDebug, but non-virtual in MutexDirect.
void clear_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 release() const
Releases the mutex.
bool has_name() const
The mutex name is only defined when compiling in DEBUG_THREADS mode.
void acquire() const
Grabs the mutex if it is available.
bool debug_is_locked() const
Returns true if the current thread has locked the Mutex, false otherwise.
void unlock()
Alias for release() to match C++11 semantics.
bool try_acquire() const
Returns immediately, with a true value indicating the mutex has been acquired, and false indicating i...
void lock()
Alias for acquire() to match C++11 semantics.
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.