Navigation
API > API/Runtime > API/Runtime/Core
A 2-bit mutex, with its state stored externally, that is not fair and does not support recursive locking.
The 2 bits referenced by IsLockedFlag and MayHaveWaitingLockFlag must be initialized to 0 by the owner of the state prior to using it as an external mutex.
It is valid to construct more than one TExternalMutex for a given state and to use them concurrently. It is valid to use TExternalMutex exclusively as a temporary, e.g., TExternalMutex(State).Lock();
| Name | TExternalMutex |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Async/ExternalMutex.h |
| Include Path | #include "Async/ExternalMutex.h" |
Syntax
template<CIntrusiveMutexParams ParamsType>
class TExternalMutex
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TExternalMutex
(
const TExternalMutex& |
Async/ExternalMutex.h | ||
constexpr TExternalMutex
(
std::atomic< StateType >& InState |
Async/ExternalMutex.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| StateType | TIntrusiveMutexStateType_T< ParamsType > | Async/ExternalMutex.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| State | std::atomic< StateType > & | 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 |
|---|---|---|---|
TExternalMutex & operator=
(
const TExternalMutex& |
Async/ExternalMutex.h |