Template Class ContentionFreeSharedMutex#
Defined in File ContentionFreeSharedMutex.h
Nested Relationships#
Nested Types#
Class Documentation#
-
template<u32 ContentionFreeCount = 32>
class ContentionFreeSharedMutex# Contention free shared mutex (same-lock-type is recursive for X->X, X->S or S->S locks), but (S->X - is UB).
This Mutex type mostly behaves like std::shared_mutex with the difference that it is guaranteed lock/wait/contention free up to ContentionFreeCount threads.
Note
This type supports Tracy via TracySharedLockable.
- Template Parameters:
ContentionFreeCount – Max number of threads to support contention free. Falls back to exclusive locking when max is reached.
Public Functions
-
inline ContentionFreeSharedMutex()#
-
inline ~ContentionFreeSharedMutex()#
-
ContentionFreeSharedMutex(const ContentionFreeSharedMutex&) = delete#
-
ContentionFreeSharedMutex(ContentionFreeSharedMutex&&) = delete#
-
ContentionFreeSharedMutex &operator=(const ContentionFreeSharedMutex&) = delete#
-
ContentionFreeSharedMutex &operator=(ContentionFreeSharedMutex&&) = delete#
-
inline bool try_lock_shared()#
-
inline void lock_shared()#
-
inline void unlock_shared()#
-
inline bool try_lock()#
-
inline void lock()#
-
inline void unlock()#