Navigation
API > API/Runtime > API/Runtime/Core
An eight-byte shared mutex that is not fair and supports recursive locking.
Prefer FRecursiveMutex when shared locking is not required. Prefer FSharedMutex when recursive locking is not required. All non-recursive shared locks will wait when any thread is waiting to take an exclusive lock. An exclusive lock and a shared lock may not be simultaneously held by the same thread.
| Name | FSharedRecursiveMutex |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Async/SharedRecursiveMutex.h |
| Include Path | #include "Async/SharedRecursiveMutex.h" |
Syntax
class FSharedRecursiveMutex
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
constexpr FSharedRecursiveMutex () |
Async/SharedRecursiveMutex.h | ||
FSharedRecursiveMutex
(
const FSharedRecursiveMutex& |
Async/SharedRecursiveMutex.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| LockCountMask | uint32 | Async/SharedRecursiveMutex.h | |
| LockCountShift | uint32 | Async/SharedRecursiveMutex.h | |
| MayHaveWaitingLockFlag | uint32 | Async/SharedRecursiveMutex.h | |
| MayHaveWaitingSharedLockFlag | uint32 | Async/SharedRecursiveMutex.h | |
| SharedLockCountMask | uint32 | Async/SharedRecursiveMutex.h | |
| SharedLockCountShift | uint32 | Async/SharedRecursiveMutex.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| State | std::atomic< uint32 > | Async/SharedRecursiveMutex.h | ||
| ThreadId | std::atomic< uint32 > | Async/SharedRecursiveMutex.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool IsLocked() |
Async/SharedRecursiveMutex.h | ||
bool IsLockShared() |
Async/SharedRecursiveMutex.h | ||
void Lock() |
Async/SharedRecursiveMutex.h | ||
void LockShared
(
Core::Private::FSharedRecursiveMutexLink& Link |
Async/SharedRecursiveMutex.h | ||
bool TryLock() |
Async/SharedRecursiveMutex.h | ||
bool TryLockShared
(
Core::Private::FSharedRecursiveMutexLink& Link |
Use TSharedLock or TDynamicSharedLock to acquire a shared lock. | Async/SharedRecursiveMutex.h | |
void Unlock() |
Async/SharedRecursiveMutex.h | ||
void UnlockShared
(
Core::Private::FSharedRecursiveMutexLink& Link |
Async/SharedRecursiveMutex.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSharedRecursiveMutex & operator=
(
const FSharedRecursiveMutex& |
Async/SharedRecursiveMutex.h |