Navigation
API > API/Runtime > API/Runtime/Core
A mutex which takes it state from an external source and uses only its 2 LSBs. The external source must ensure that the state is valid for the lifetime of the mutex.
Note: Changes to this class should also be ported to FMutex. These classes could be merged via templatization but we would want to make sure this doesn't cause any undesired code-bloat / side effects.
| Name | FExternalMutex |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Async/ExternalMutex.h |
| Include Path | #include "Async/ExternalMutex.h" |
Syntax
class FExternalMutex
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
constexpr FExternalMutex
(
std::atomic< uint8 >& InState |
Async/ExternalMutex.h | ||
FExternalMutex
(
const FExternalMutex& |
Async/ExternalMutex.h | ||
FExternalMutex
(
std::atomic< uint8 >& InState, |
Construct in a locked state. Avoids an expensive compare-and-swap at creation time. | Async/ExternalMutex.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| bUnlockImmediately | bool | Async/ExternalMutex.h | |
| IsLockedFlag | uint8 | Async/ExternalMutex.h | |
| MayHaveWaitingLockFlag | uint8 | Async/ExternalMutex.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| State | std::atomic< uint8 > & | Async/ExternalMutex.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool IsLocked() |
Async/ExternalMutex.h | ||
void Lock() |
Async/ExternalMutex.h | ||
bool TryLock() |
Async/ExternalMutex.h | ||
void Unlock() |
Async/ExternalMutex.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FExternalMutex & operator=
(
const FExternalMutex& |
Async/ExternalMutex.h |