Navigation
API > API/Runtime > API/Runtime/Core
A four-byte shared mutex that is not fair and does not support recursive locking.
Prefer FMutex when shared locking is not required. All new 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 | FSharedMutex |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Async/SharedMutex.h |
| Include Path | #include "Async/SharedMutex.h" |
Syntax
class FSharedMutex
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
constexpr FSharedMutex () |
Async/SharedMutex.h | ||
FSharedMutex
(
const FSharedMutex& |
Async/SharedMutex.h |
Structs
| Name | Remarks |
|---|---|
| FParams |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| IsLockedFlag | uint32 | Async/SharedMutex.h | |
| MayHaveWaitingLockFlag | uint32 | Async/SharedMutex.h | |
| MayHaveWaitingSharedLockFlag | uint32 | Async/SharedMutex.h | |
| SharedLockCountMask | uint32 | Async/SharedMutex.h | |
| SharedLockCountShift | uint32 | Async/SharedMutex.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| State | std::atomic< uint32 > | Async/SharedMutex.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool IsLocked() |
Async/SharedMutex.h | ||
bool IsLockShared() |
Async/SharedMutex.h | ||
void Lock() |
Async/SharedMutex.h | ||
void LockShared() |
Async/SharedMutex.h | ||
bool TryLock() |
Async/SharedMutex.h | ||
bool TryLockShared() |
Async/SharedMutex.h | ||
void Unlock() |
Async/SharedMutex.h | ||
void UnlockShared() |
Async/SharedMutex.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSharedMutex & operator=
(
const FSharedMutex& |
Async/SharedMutex.h |