|
CeresEngine 0.2.0
A game development framework
|
A scoped RAII lock holder for a AsyncSharedMutex. More...
#include <CeresEngine/Foundation/Threading/AsyncMutex.hpp>
Public Member Functions | |
| Lock (TAsyncSharedMutex &sm, const bool exclusive) | |
| ~Lock () | |
| Unlocks the mutex upon this shared scoped lock destructing. | |
| Lock (const Lock &)=delete | |
| Lock & | operator= (const Lock &)=delete |
| Lock (Lock &&other) noexcept | |
| Lock & | operator= (Lock &&other) noexcept |
| void | unlock () |
| Unlocks the shared mutex prior to this lock going out of scope. | |
| bool | isExclusive () const noexcept |
Private Attributes | |
| TAsyncSharedMutex * | mMutex {nullptr} |
| bool | mExclusive {false} |
A scoped RAII lock holder for a AsyncSharedMutex.
It will call the appropriate unlock() or unlock_shared() based on how the AsyncSharedMutex was originally acquired, either shared or exclusive modes.
|
inline |
|
inline |
Unlocks the mutex upon this shared scoped lock destructing.
|
delete |
|
inlinenoexcept |
|
inlinenoexcept |
|
delete |
|
inlinenoexcept |
|
inline |
Unlocks the shared mutex prior to this lock going out of scope.
|
private |
|
private |