UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::TExternalMutex< ParamsType > Class Template Referencefinal

#include <ExternalMutex.h>

Public Member Functions

 TExternalMutex (const TExternalMutex &)=delete
 
TExternalMutexoperator= (const TExternalMutex &)=delete
 
constexpr TExternalMutex (std::atomic< StateType > &InState)
 
bool IsLocked () const
 
bool TryLock ()
 
void Lock ()
 
void Unlock ()
 

Detailed Description

template<CIntrusiveMutexParams ParamsType>
class UE::TExternalMutex< ParamsType >

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();

Constructor & Destructor Documentation

◆ TExternalMutex() [1/2]

template<CIntrusiveMutexParams ParamsType>
UE::TExternalMutex< ParamsType >::TExternalMutex ( const TExternalMutex< ParamsType > &  )
delete

◆ TExternalMutex() [2/2]

template<CIntrusiveMutexParams ParamsType>
constexpr UE::TExternalMutex< ParamsType >::TExternalMutex ( std::atomic< StateType > &  InState)
inlineexplicitconstexpr

Member Function Documentation

◆ IsLocked()

template<CIntrusiveMutexParams ParamsType>
bool UE::TExternalMutex< ParamsType >::IsLocked ( ) const
inline

◆ Lock()

template<CIntrusiveMutexParams ParamsType>
void UE::TExternalMutex< ParamsType >::Lock ( )
inline

◆ operator=()

template<CIntrusiveMutexParams ParamsType>
TExternalMutex & UE::TExternalMutex< ParamsType >::operator= ( const TExternalMutex< ParamsType > &  )
delete

◆ TryLock()

template<CIntrusiveMutexParams ParamsType>
bool UE::TExternalMutex< ParamsType >::TryLock ( )
inline

◆ Unlock()

template<CIntrusiveMutexParams ParamsType>
void UE::TExternalMutex< ParamsType >::Unlock ( )
inline

The documentation for this class was generated from the following file: