UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IntrusiveUniqueLock.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
#pragma once
4
5
#include "
Async/IntrusiveMutex.h
"
6
7
#include <atomic>
8
9
namespace
UE
10
{
11
16
template
<UE::CIntrusiveMutexParams ParamsType>
17
class
TIntrusiveUniqueLock
18
{
19
using
StateType =
UE::TIntrusiveMutexStateType_T<ParamsType>
;
20
21
public
:
22
TIntrusiveUniqueLock
(
TIntrusiveUniqueLock
&
NoCopyConstruction
) =
delete
;
23
TIntrusiveUniqueLock
&
operator=
(
TIntrusiveUniqueLock
&
NoAssignment
) =
delete
;
24
25
[[
nodiscard
]]
explicit
TIntrusiveUniqueLock
(std::atomic<StateType>&
InState
)
26
: State(
InState
)
27
{
28
UE::TIntrusiveMutex<ParamsType>::Lock
(State);
29
}
30
31
~TIntrusiveUniqueLock
()
32
{
33
UE::TIntrusiveMutex<ParamsType>::Unlock
(State);
34
}
35
36
private
:
37
std::atomic<StateType>& State;
38
};
39
40
}
// namespace UE
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
IntrusiveMutex.h
UE::TExternalMutex::Unlock
void Unlock()
Definition
ExternalMutex.h:51
UE::TExternalMutex::Lock
void Lock()
Definition
ExternalMutex.h:46
UE::TIntrusiveUniqueLock
Definition
IntrusiveUniqueLock.h:18
UE::TIntrusiveUniqueLock::operator=
TIntrusiveUniqueLock & operator=(TIntrusiveUniqueLock &NoAssignment)=delete
UE::TIntrusiveUniqueLock::~TIntrusiveUniqueLock
~TIntrusiveUniqueLock()
Definition
IntrusiveUniqueLock.h:31
UE::TIntrusiveUniqueLock::TIntrusiveUniqueLock
TIntrusiveUniqueLock(TIntrusiveUniqueLock &NoCopyConstruction)=delete
UE::TIntrusiveUniqueLock::TIntrusiveUniqueLock
TIntrusiveUniqueLock(std::atomic< StateType > &InState)
Definition
IntrusiveUniqueLock.h:25
UE
Definition
AdvancedWidgetsModule.cpp:13
UE::TIntrusiveMutexStateType_T
std::decay_t< decltype(ParamsType::IsLockedFlag)> TIntrusiveMutexStateType_T
Definition
IntrusiveMutex.h:19
Engine
Source
Runtime
Core
Public
Async
IntrusiveUniqueLock.h
Generated by
1.9.8