PxMutexT

Defined in include/foundation/PxMutex.h

Inheritance Relationships

Base Type

template<typename Alloc = PxReflectionAllocator<PxMutexImpl>>
class PxMutexT : protected PxReflectionAllocator<PxMutexImpl>

Public Functions

inline PxMutexT(const Alloc &alloc = Alloc())

The constructor for Mutex creates a mutex.

It is initially unlocked.

inline ~PxMutexT()

The destructor for Mutex deletes the mutex.

inline void lock() const

Acquire (lock) the mutex.

If the mutex is already locked by another thread, this method blocks until the mutex is unlocked.

inline bool trylock() const

Acquire (lock) the mutex.

If the mutex is already locked by another thread, this method returns false without blocking, returns true if lock is successfully acquired

inline void unlock() const

Release (unlock) the mutex, the calling thread must have previously called lock() or method will error.

Protected Functions

inline void *allocate(size_t size, const char *filename, int line)
inline void deallocate(void *ptr)
class ScopedLock

Public Functions

inline ScopedLock(PxMutexT<Alloc> &mutex)
inline ~ScopedLock()