UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AsyncLoading.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*=============================================================================
4 AsyncLoading.h: Unreal async loading definitions.
5=============================================================================*/
6
7#pragma once
8
9#include "CoreMinimal.h"
12#include "UObject/GCObject.h"
14#include "UObject/Package.h"
15#include "Templates/Casts.h"
21
23
24struct FAsyncPackage;
25struct FFlushRequest;
27
28
44
47{
50 : Package(InPackage)
51 {
52 }
54 {
56 return *Package;
57 }
59 {
60 return GetTypeHash(WeakPtr.Package);
61 }
63 {
64 return Package == Other.Package;
65 }
67};
68
71{
77 {
78 return GetTypeHash(WeakPtr.PackageName);
79 }
81 {
82 return SerialNumber == Other.SerialNumber;
83 }
88};
89
90#define VERIFY_WEAK_ASYNC_PACKAGE_PTRS (0) //(DO_CHECK)
91
92#if VERIFY_WEAK_ASYNC_PACKAGE_PTRS
94#else
96#endif
97
116
117#define USE_IMPLICIT_ARCS (1) // saves time and memory by not actually adding the arcs that are always present, they are:
118
119// Import: EEventLoadNode::ImportOrExport_Create -> EEventLoadNode::ImportOrExport_Serialize: can't consider this import serialized until we hook it up after creation
120// Import: EEventLoadNode::ImportOrExport_Serialize -> EEventLoadNode::Package_ExportsSerialized: can't consider the package done with event driven loading until all imports are serialized
121
122// Export: EEventLoadNode::ImportOrExport_Create -> EEventLoadNode::Export_StartIO: can't do the IO request until it is created
123// Export: EEventLoadNode::Export_StartIO -> EEventLoadNode::ImportOrExport_Serialize: can't serialize until the IO request is ready
124// Import: EEventLoadNode::ImportOrExport_Serialize -> EEventLoadNode::Package_ExportsSerialized: can't consider the package done with event driven loading until all exports are serialized
125
128{
130 FPackageIndex ImportOrExportIndex; // IsNull()==true for PACKAGE_ Phases
132
138 {
139 return GetTypeHash(NodePtr.WaitingPackage) ^ (GetTypeHash(NodePtr.ImportOrExportIndex) << 13) ^ (uint32(NodePtr.Phase) << 27);
140 }
141
142#if 0
143 FORCEINLINE bool operator<(const FEventLoadNodePtr& Other) const // not a total order
144 {
145 return WaitingPackage.SerialNumber < Other.WaitingPackage.SerialNumber;
146 }
147#endif
149 {
150 return WaitingPackage == Other.WaitingPackage &&
151 ImportOrExportIndex == Other.ImportOrExportIndex &&
152 Phase == Other.Phase;
153 }
154#if USE_IMPLICIT_ARCS
156 {
157 return ImportOrExportIndex.IsNull() ? 0 : 1; // only import and export nodes have implicit arcs, and every one of them has exactly one
158 }
160 {
161 check(!ImportOrExportIndex.IsNull()); // package nodes don't have implicit arcs
162 FEventLoadNodePtr Result;
163 Result.WaitingPackage = WaitingPackage;
165 {
167 check(Result.ImportOrExportIndex.IsNull());
168 }
169 else
170 {
171 Result.ImportOrExportIndex = ImportOrExportIndex;
173 {
175 }
176 else
177 {
180 }
181 }
182 return Result;
183 }
184
185#endif
186
187 FString HumanReadableStringForDebugging() const;
188};
189
210
213{
222
224 : Array(nullptr)
227 , NumImports(0)
228 , NumExports(0)
229 , OffsetToImports(0)
230 , OffsetToExports(0)
231 {
232 }
233
234
236 {
237 FEventLoadNode& NodeRef(PtrToNode(Node));
238 check(!NodeRef.bAddedToGraph);
239 NodeRef.bAddedToGraph = true;
240 return (++TotalNumberOfNodesAdded) == 1; // first add, the caller will add this to a list of things with outstanding nodes
241 }
243 {
244 FEventLoadNode& NodeRef(PtrToNode(Node));
245 check(NodeRef.bAddedToGraph);
246 NodeRef.bAddedToGraph = false;
247 return (--TotalNumberOfNodesAdded) == 0; // first add, the caller will add this to a list of things with outstanding nodes
248 }
250 {
251 FEventLoadNode& NodeRef(PtrToNode(Node));
252 check(!bCheckAdded || NodeRef.bAddedToGraph);
253 return NodeRef;
254 }
255
257 void Shutdown();
259private:
261 {
262 int32 Index;
263 if (Node.ImportOrExportIndex.IsNull())
264 {
265 Index = int32(Node.Phase);
267 return PackageNodes[Index];
268 }
269 check(TotalNumberOfImportExportNodes); // otherwise Init was not called yet
270 if (Node.ImportOrExportIndex.IsImport())
271 {
275 }
276 else
277 {
281 }
283 return Array[Index];
284 }
285
286};
287
306
327
330{
331public:
334 FORCEINLINE void HeapPop(int32& OutItem, bool bAllowShrinking)
335 {
337 }
338};
339
345{
347 friend struct FAsyncPackageScope;
353
364
367
372 {
373 return LoadPercentage;
374 }
375
379 double GetLoadStartTime() const;
380
384 void ResetLoader();
385
389 void DetachLinker();
390
395
400 {
401 return Desc.Name;
402 }
403
408 {
409 return Desc.PackagePath;
410 }
411
412 void AddCompletionCallback(TUniquePtr<FLoadPackageAsyncDelegate>&& Callback, bool bInternal);
413
416 {
417 return DependencyRefCount.GetValue();
418 }
419
421 {
422 return LinkerRoot;
423 }
424
427 {
428 return bLoadHasFinished;
429 }
430
433 {
434 return Desc.RequestID;
435 }
436
439 {
440 return Desc.Priority;
441 }
442
448
451 {
452 return bLoadHasFailed;
453 }
454
457 {
458 bThreadedLoadingFinished = true;
459 }
460
463 {
464 return bThreadedLoadingFinished;
465 }
466
468 void AddRequestID(int32 Id);
469
473 void Cancel();
474
482
485 {
486 return ReentryCount > 0;
487 }
488
490 virtual void AddReferencedObjects(FReferenceCollector& Collector) override;
491 virtual FString GetReferencerName() const override
492 {
493 return FString::Printf(TEXT("FAsyncPackage %s"), *GetPackageName().ToString());
494 }
495
497 void AddObjectReference(UObject* InObject);
498
501
504
505#if WITH_EDITOR
508#endif
509
512
514 bool HasClusterObjects() const
515 {
516 return DeferredClusterObjects.Num() > 0;
517 }
518
521
523 bool IsDependencyOf(int32 RequestID);
524
525private:
526
527 friend class FLinkerLoad;
528
530 static bool AreAllDependenciesFullyLoadedInternal(FAsyncPackage* Package, TSet<UPackage*>& VisitedPackages, FString& OutError);
531
532 struct FCompletionCallback
533 {
534 bool bIsInternal;
535 bool bCalled;
537
538 FCompletionCallback()
539 : bIsInternal(false)
540 , bCalled(false)
541 {
542 }
544 : bIsInternal(bInInternal)
545 , bCalled(false)
546 , Callback(MoveTemp(InCallback))
547 {
548 }
549 };
550
552 void AddDependentRequestsTo(FAsyncPackage* InDependency);
553
555 void AddDependentRequests(TArrayView<int32 const> Requests);
556
557 bool IsFullyLoadedObj(UObject* Obj);
558
564 UPackage* LinkerRoot;
566 TArray<FCompletionCallback> CompletionCallbacks;
568 TMap<FName, FAsyncPackage*> PendingImportedPackages;
570 TArray<FAsyncPackage*> ReferencedImports;
572 FAsyncPackage* DependencyRootPackage;
574 FThreadSafeCounter DependencyRefCount;
576 int32 LoadImportIndex;
578 int32 ImportIndex;
580 int32 ExportIndex;
582 int32 PreLoadIndex;
584 int32 PreLoadSortIndex;
586 int32 FinishExternalReadDependenciesIndex;
588 int32 PostLoadIndex;
590 int32 DeferredPostLoadIndex;
592 int32 PostLoadInstanceIndex;
594 int32 DeferredFinalizeIndex;
596 int32 DeferredClusterIndex;
598 float TimeLimit;
600 bool bUseTimeLimit;
602 bool bUseFullTimeLimit;
604 bool bTimeLimitExceeded;
606 bool bLoadHasFailed;
608 bool bLoadHasFinished;
610 bool bThreadedLoadingFinished;
612 bool bCreatedLinkerRoot;
614 double TickStartTime;
616 UObject* LastObjectWorkWasPerformedOn;
618 const TCHAR* LastTypeOfWorkPerformed;
620 double LoadStartTime;
622 float LoadPercentage;
624 TArray<UObject*> DeferredPostLoadObjects;
626 TArray<TObjectPtr<UObject>> DeferredFinalizeObjects;
628 TArray<TObjectPtr<UObject>> PackageObjLoaded;
630 TArray<FLinkerLoad*> DelayedLinkerClosePackages;
632 TArray<UObject*> DeferredClusterObjects;
633
635 TArray<int32> RequestIDs;
636
637 FRWLock DependentRequestsLock;
639 TSet<int32> DependentRequests;
640
641#if WITH_METADATA
643 TOptional<int32> MetaDataIndex;
644#endif // WITH_METADATA
646 std::atomic<int32> ReentryCount;
648 TSet<TObjectPtr<UObject>> ReferencedObjects;
650 FCriticalSection ReferencedObjectsCritical;
652 FAsyncLoadingThread& AsyncLoadingThread;
653 FEDLBootNotificationManager& EDLBootNotificationManager;
655 TSet<TObjectPtr<UPackage>> ImportedPackages;
656
657public:
658
659
664
671
688
694
696
697 TSet<FWeakAsyncPackagePtr> PackagesIMayBeWaitingForBeforePostload; // these need to be reexamined and perhaps deleted or collapsed
698
699 TSet<FWeakAsyncPackagePtr> PackagesIAmWaitingForBeforePostload; // These are linked with PackagesIAmWaitingForBeforePostload, so we can be sure the other package will let us know
701
703
706
710
711 void Event_CreateLinker();
712 void Event_FinishLinker();
714 void Event_SetupImports();
715 void Event_SetupExports();
717 void Event_ExportsDone();
719 void Event_StartPostload();
720
725
726
731
734 void EventDrivenCreateExport(int32 LocalExportIndex);
736 void EventDrivenSerializeExport(int32 LocalExportIndex);
739 void FlushPrecacheBuffer();
741
742 void DumpDependencies(const TCHAR* Label, UObject* Obj);
744
746 template<class T>
748 {
750 if (!Result)
751 {
752 return nullptr;
753 }
754 return CastChecked<T>(Result);
755 }
756
758
760 void DoneAddingPrerequistesFireIfNone(EEventLoadNode Phase, FPackageIndex ImportOrExportIndex = FPackageIndex(), bool bWasHeldForLater = false);
761 void RemoveNode(EEventLoadNode Phase, FPackageIndex ImportOrExportIndex = FPackageIndex());
762 void NodeWillBeFiredExternally(EEventLoadNode Phase, FPackageIndex ImportOrExportIndex = FPackageIndex());
764 void RemoveAllNodes();
766
767 FString GetDebuggingPath(FPackageIndex Idx);
768
770 {
772 Args.OutLastObjectWorkWasPerformedOn = LinkerRoot;
773 TickStartTime = Args.TickStartTime;
774 LastTypeOfWorkPerformed = WorkType;
775 LastObjectWorkWasPerformedOn = LinkerRoot;
776 TimeLimit = Args.TimeLimit;
777 bUseTimeLimit = Args.bUseTimeLimit;
778 bUseFullTimeLimit = Args.bUseFullTimeLimit;
779 }
780
782 {
783 return AsyncLoadingThread;
784 }
785
789#if PERF_TRACK_DETAILED_ASYNC_STATS
791 int32 TickCount;
794
809
811 double TickTime;
813 double CreateLinkerTime;
815 double FinishLinkerTime;
817 double CreateImportsTime;
819 double CreateExportsTime;
821 double PreLoadObjectsTime;
823 double PostLoadObjectsTime;
825 double FinishObjectsTime;
826
827#endif
828
830
837
839 void CloseDelayedLinkers();
840
841private:
847 bool GiveUpTimeSlice();
853 bool IsTimeLimitExceeded();
854
860 void BeginAsyncLoad();
865 void EndAsyncLoad();
871 EAsyncPackageState::Type CreateLinker();
877 EAsyncPackageState::Type FinishLinker();
883 EAsyncPackageState::Type LoadImports();
889 EAsyncPackageState::Type CreateImports();
890
891#if WITH_METADATA
897 EAsyncPackageState::Type CreateMetaData();
898#endif // WITH_METADATA
904 EAsyncPackageState::Type CreateExports();
910 EAsyncPackageState::Type PreLoadObjects();
916 EAsyncPackageState::Type PostLoadObjects();
922 EAsyncPackageState::Type FinishObjects();
923
929 EAsyncPackageState::Type FinishExternalReadDependencies();
930
934 void ImportPreLoadedAsyncCallback(const FName& PackageName, UPackage* LoadedPackage, EAsyncLoadingResult::Type Result);
935
942
948 bool AddUniqueLinkerDependencyPackage(FAsyncPackage& PendingImport);
949
956 void AddImportDependency(const FName& PendingImport, const FName& PackageToLoad, FLinkerInstancingContext InstancingContext);
957
961 void FreeReferencedImports();
962
966 void UpdateLoadPercentage();
967
968#if PERF_TRACK_DETAILED_ASYNC_STATS
970 void TrackCreateExportTimeForClass(const UClass* Class, double Time);
971
973 void TrackPostLoadTimeForClass(const UClass* Class, double Time);
974#endif // PERF_TRACK_DETAILED_ASYNC_STATS
975
976public:
977
980};
981
993
EAllowShrinking
Definition AllowShrinking.h:10
#define UE_ALLOWSHRINKING_BOOL_DEPRECATED(FunctionName)
Definition AllowShrinking.h:31
#define FORCEINLINE
Definition AndroidPlatform.h:140
#define check(expr)
Definition AssertionMacros.h:314
FUnsafeWeakAsyncPackagePtr FCheckedWeakAsyncPackagePtr
Definition AsyncLoading.h:95
EEventLoadNode
Definition AsyncLoading.h:100
EAsyncPackageLoadingState
Definition AsyncLoading.h:31
#define UE_BUILD_TEST
Definition Build.h:17
#define UE_BUILD_SHIPPING
Definition Build.h:20
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int64 int64
A 64-bit signed integer.
Definition Platform.h:1127
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE::FPlatformRecursiveMutex FCriticalSection
Definition CriticalSection.h:53
return true
Definition ExternalRpcRegistry.cpp:601
bool operator<(const FTextFormatString &LHS, const FTextFormatString &RHS)
Definition ITextFormatArgumentModifier.h:147
void Init()
Definition LockFreeList.h:4
decltype(auto) Visit(Func &&Callable, Variants &&... Args)
Definition TVariant.h:271
int32 TAsyncLoadPriority
Definition UObjectGlobals.h:726
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition AsyncLoadingThread.h:235
Definition GCObject.h:128
Definition AsyncLoading.h:330
void HeapPop(int32 &OutItem, EAllowShrinking AllowShrinking=EAllowShrinking::Default)
Definition AsyncLoading.cpp:1718
Definition LinkerInstancingContext.h:99
Definition LinkerLoad.h:124
Definition NameTypes.h:617
Definition ObjectResource.h:44
UE_FORCEINLINE_HINT bool IsImport() const
Definition ObjectResource.h:68
int32 ToExport() const
Definition ObjectResource.h:89
int32 ToImport() const
Definition ObjectResource.h:83
UE_FORCEINLINE_HINT bool IsNull() const
Definition ObjectResource.h:78
Definition PackagePath.h:89
Definition UObjectGlobals.h:2492
Definition ThreadSafeCounter.h:14
int32 GetValue() const
Definition ThreadSafeCounter.h:120
Definition AsyncPackageLoader.h:88
Definition AsyncFileHandle.h:31
Definition ArrayView.h:139
Definition Array.h:670
UE_REWRITE SizeType Num() const
Definition Array.h:1144
Definition UnrealString.h.inl:34
Definition UniquePtr.h:107
Definition Class.h:3793
Definition CriticalSection.h:14
Definition Object.h:95
Definition Package.h:216
Type
Definition UObjectGlobals.h:694
Type
Definition UObjectGlobals.h:1141
Definition Linker.cpp:38
@ false
Definition radaudio_common.h:23
U16 Index
Definition radfft.cpp:71
Definition AsyncLoading.h:309
bool bUseFullTimeLimit
Definition AsyncLoading.h:315
double TickStartTime
Definition AsyncLoading.h:310
UObject * OutLastObjectWorkWasPerformedOn
Definition AsyncLoading.h:312
const TCHAR * OutLastTypeOfWorkPerformed
Definition AsyncLoading.h:311
bool bUseTimeLimit
Definition AsyncLoading.h:314
FAsyncLoadEventArgs()
Definition AsyncLoading.h:317
float TimeLimit
Definition AsyncLoading.h:313
Definition AsyncPackage.h:18
int32 RequestID
Definition AsyncPackage.h:20
FPackagePath PackagePath
Definition AsyncPackage.h:24
FName Name
Definition AsyncPackage.h:22
TAsyncLoadPriority Priority
Definition AsyncPackage.h:30
Definition AsyncLoading.cpp:548
Definition AsyncLoading.h:673
int32 LastExportCovered
Definition AsyncLoading.h:677
TArray< int32 > ExportsToRead
Definition AsyncLoading.h:678
int64 BytesToRead
Definition AsyncLoading.h:675
FExportIORequest()
Definition AsyncLoading.h:680
int32 FirstExportCovered
Definition AsyncLoading.h:676
int64 Offset
Definition AsyncLoading.h:674
Definition AsyncLoading.h:345
bool HasThreadedLoadingFinished() const
Definition AsyncLoading.h:462
FORCEINLINE float GetLoadPercentage() const
Definition AsyncLoading.h:371
int32 SerialNumber
Definition AsyncLoading.h:663
void DetachLinker()
Definition AsyncLoading.cpp:5815
FORCEINLINE int32 GetDependencyRefCount() const
Definition AsyncLoading.h:415
FImportOrImportIndexArray ExportsThatCanBeCreated
Definition AsyncLoading.h:667
int32 ImportAddNodeIndex
Definition AsyncLoading.h:704
T * CastEventDrivenIndexToObject(FPackageIndex Index, bool bCheckSerialized, FPackageIndex DumpIndex=FPackageIndex())
Definition AsyncLoading.h:747
void Event_SetupExports()
Definition AsyncLoading.cpp:2663
void MarkRequestIDsAsComplete()
Definition AsyncLoading.cpp:5780
int64 PrecacheRequestReady(IAsyncReadRequest *Req)
Definition AsyncLoading.cpp:3707
void ConditionalQueueProcessPostloadWait()
Definition AsyncLoading.cpp:2793
void DoneAddingPrerequistesFireIfNone(EEventLoadNode Phase, FPackageIndex ImportOrExportIndex=FPackageIndex(), bool bWasHeldForLater=false)
Definition AsyncLoading.cpp:4105
void FireNode(FEventLoadNodePtr &NodeToFire)
Definition AsyncLoading.cpp:4152
TArray< IAsyncReadRequest * > ReadyPrecacheRequests
Definition AsyncLoading.h:670
FORCEINLINE void SetPriority(TAsyncLoadPriority InPriority)
Definition AsyncLoading.h:444
void SetTimeLimit(FAsyncLoadEventArgs &Args, const TCHAR *WorkType)
Definition AsyncLoading.h:769
void Event_FinishLinker()
Definition AsyncLoading.cpp:1878
bool HasClusterObjects() const
Definition AsyncLoading.h:514
void ResetLoader()
Definition AsyncLoading.cpp:5798
FImportOrImportIndexArray ExportsThatCanBeSerialized
Definition AsyncLoading.h:669
virtual void AddReferencedObjects(FReferenceCollector &Collector) override
Definition AsyncLoading.cpp:5716
bool IsDependencyOf(int32 RequestID)
Definition AsyncLoading.cpp:4632
bool bProcessImportsAndExportsInFlight
Definition AsyncLoading.h:707
EAsyncPackageState::Type ProcessImportsAndExports_Event()
Definition AsyncLoading.cpp:3759
void Event_SetupImports()
Definition AsyncLoading.cpp:2325
FORCEINLINE bool HasLoadFailed() const
Definition AsyncLoading.h:450
bool AreAllDependenciesFullyLoaded(TSet< UPackage * > &VisitedPackages)
Definition AsyncLoading.cpp:4658
UPackage * GetLoadedPackage()
Definition AsyncLoading.cpp:7343
void Event_StartImportPackages()
Definition AsyncLoading.cpp:2026
void MakeNextPrecacheRequestCurrent()
Definition AsyncLoading.cpp:3715
TSet< FWeakAsyncPackagePtr > PackagesIMayBeWaitingForBeforePostload
Definition AsyncLoading.h:697
FUObjectSerializeContext * GetSerializeContext()
Definition AsyncLoading.cpp:852
void RemoveAllNodes()
Definition AsyncLoading.cpp:4141
void EventDrivenCreateExport(int32 LocalExportIndex)
Definition AsyncLoading.cpp:3168
void Event_ProcessImportsAndExports()
Definition AsyncLoading.cpp:2901
TSet< FWeakAsyncPackagePtr > PackagesIAmWaitingForBeforePostload
Definition AsyncLoading.h:699
void LinkImport(int32 LocalImportIndex)
Definition AsyncLoading.cpp:2921
EAsyncPackageState::Type LoadImports_Event()
Definition AsyncLoading.cpp:2114
void ConditionalQueueProcessImportsAndExports(bool bRequeueForTimeout=false)
Definition AsyncLoading.cpp:2771
int64 CurrentBlockBytes
Definition AsyncLoading.h:692
void EventDrivenSerializeExport(int32 LocalExportIndex)
Definition AsyncLoading.cpp:3457
FImportOrImportIndexArray ImportsThatAreNowCreated
Definition AsyncLoading.h:665
double GetLoadStartTime() const
Definition AsyncLoading.cpp:5790
FEventLoadNodeArray EventNodeArray
Definition AsyncLoading.h:757
void Cancel()
Definition AsyncLoading.cpp:7349
bool bAllExportsSerialized
Definition AsyncLoading.h:709
EAsyncPackageState::Type PostLoadDeferredObjects(double InTickStartTime, bool bInUseTimeLimit, double InOutTimeLimit)
Definition AsyncLoading.cpp:7002
bool IsBeingProcessedRecursively() const
Definition AsyncLoading.h:484
UObject * EventDrivenIndexToObject(FPackageIndex Index, bool bCheckSerialized, FPackageIndex DumpIndex=FPackageIndex())
Definition AsyncLoading.cpp:3097
TMap< TPair< FName, FPackageIndex >, FPackageIndex > ObjectNameWithOuterToExport
Definition AsyncLoading.h:695
FAsyncLoadingThread & GetOwnerThread()
Definition AsyncLoading.h:781
void RemoveNode(EEventLoadNode Phase, FPackageIndex ImportOrExportIndex=FPackageIndex())
Definition AsyncLoading.cpp:4116
void Event_ExportsDone()
Definition AsyncLoading.cpp:3896
void EventDrivenLoadingComplete()
Definition AsyncLoading.cpp:4070
void AddArc(FEventLoadNodePtr &PrereqisiteNode, FEventLoadNodePtr &DependentNode)
Definition AsyncLoading.cpp:4136
FORCEINLINE bool HasFinishedLoading() const
Definition AsyncLoading.h:426
TMap< IAsyncReadRequest *, FAsyncPackage::FExportIORequest > PrecacheRequests
Definition AsyncLoading.h:689
EAsyncPackageState::Type SetupImports_Event()
Definition AsyncLoading.cpp:2376
FORCEINLINE const FPackagePath & GetPackagePath() const
Definition AsyncLoading.h:407
FORCEINLINE UPackage * GetLinkerRoot() const
Definition AsyncLoading.h:420
void MarkNewObjectForLoadIfItIsAnExport(UObject *Object)
Definition AsyncLoading.cpp:3444
~FAsyncPackage()
Definition AsyncLoading.cpp:5683
void DumpDependencies(const TCHAR *Label, UObject *Obj)
Definition AsyncLoading.cpp:3006
void FlushObjectLinkerCache()
Definition AsyncLoading.cpp:5827
bool bProcessPostloadWaitInFlight
Definition AsyncLoading.h:708
EAsyncPackageLoadingState AsyncPackageLoadingState
Definition AsyncLoading.h:662
bool AnyImportsAndExportWorkOutstanding()
Definition AsyncLoading.cpp:2761
virtual FString GetReferencerName() const override
Definition AsyncLoading.h:491
FORCEINLINE const FName & GetPackageName() const
Definition AsyncLoading.h:399
void SetDependencyRootPackage(FAsyncPackage *InDependencyRootPackage)
Definition AsyncLoading.h:478
FImportOrImportIndexArray ExportsThatCanHaveIOStarted
Definition AsyncLoading.h:668
FORCEINLINE TAsyncLoadPriority GetPriority() const
Definition AsyncLoading.h:438
int32 ExportAddNodeIndex
Definition AsyncLoading.h:705
void NodeWillBeFiredExternally(EEventLoadNode Phase, FPackageIndex ImportOrExportIndex=FPackageIndex())
Definition AsyncLoading.cpp:4126
FORCEINLINE int32 GetRequestID() const
Definition AsyncLoading.h:432
TSet< FWeakAsyncPackagePtr > OtherPackagesWaitingForMeBeforePostload
Definition AsyncLoading.h:700
EAsyncPackageState::Type TickAsyncPackage(bool bUseTimeLimit, bool bInbUseFullTimeLimit, float &InOutTimeLimit)
Definition AsyncLoading.cpp:5935
FObjectImport * FindExistingImport(int32 LocalImportIndex)
Definition AsyncLoading.cpp:2065
void Event_CreateLinker()
Definition AsyncLoading.cpp:1813
void CallCompletionCallbacks(bool bInternalOnly, EAsyncLoadingResult::Type LoadingResult)
Definition AsyncLoading.cpp:7324
void FlushPrecacheBuffer()
Definition AsyncLoading.cpp:3747
TMap< int32, IAsyncReadRequest * > ExportIndexToPrecacheRequest
Definition AsyncLoading.h:690
int64 CurrentBlockOffset
Definition AsyncLoading.h:691
FEventLoadNodePtr AddNode(EEventLoadNode Phase, FPackageIndex ImportOrExportIndex=FPackageIndex(), bool bHoldForLater=false, int32 NumImplicitPrereqs=0)
Definition AsyncLoading.cpp:4094
void EmptyReferencedObjects()
Definition AsyncLoading.cpp:5742
EAsyncPackageState::Type SetupExports_Event()
Definition AsyncLoading.cpp:2804
FImportOrImportIndexArray ImportsThatAreNowSerialized
Definition AsyncLoading.h:666
TArray< FCheckedWeakAsyncPackagePtr > PackagesWaitingToLinkImports
Definition AsyncLoading.h:702
void AddCompletionCallback(TUniquePtr< FLoadPackageAsyncDelegate > &&Callback, bool bInternal)
Definition AsyncLoading.cpp:7416
void CloseDelayedLinkers()
Definition AsyncLoading.cpp:7286
void ThreadedLoadingHasFinished()
Definition AsyncLoading.h:456
void AddObjectReference(UObject *InObject)
Definition AsyncLoading.cpp:5726
void StartPrecacheRequest()
Definition AsyncLoading.cpp:3585
void AddRequestID(int32 Id)
Definition AsyncLoading.cpp:5759
void Event_StartPostload()
Definition AsyncLoading.cpp:4041
TSet< int32 > ExportsInThisBlock
Definition AsyncLoading.h:693
FString GetDebuggingPath(FPackageIndex Idx)
Definition AsyncLoading.cpp:1048
void Event_ProcessPostloadWait()
Definition AsyncLoading.cpp:3926
Definition AsyncLoading.cpp:118
Definition AsyncLoading.h:290
void DoneAddingPrerequistesFireIfNone(FEventLoadNodePtr &NewNode, bool bWasHeldForLater=false)
Definition AsyncLoading.cpp:1333
void AddArc(FEventLoadNodePtr &PrereqisiteNode, FEventLoadNodePtr &DependentNode)
Definition AsyncLoading.cpp:1221
void NodeWillBeFiredExternally(FEventLoadNodePtr &NodeThatWasFired)
Definition AsyncLoading.cpp:1325
bool CheckForCyclesInner(const TMultiMap< FEventLoadNodePtr, FEventLoadNodePtr > &Arcs, TSet< FEventLoadNodePtr > &Visited, TSet< FEventLoadNodePtr > &Stack, const FEventLoadNodePtr &Visit)
Definition AsyncLoading.cpp:1352
void AddNode(FEventLoadNodePtr &NewNode, bool bHoldForLater=false, int32 NumImplicitPrereqs=0)
Definition AsyncLoading.cpp:1204
TArray< int32 > IndicesToFire
Definition AsyncLoading.h:292
FEventLoadNode & GetNode(FEventLoadNodePtr &NodeToGet)
Definition AsyncLoading.cpp:1197
void CheckForCycles(bool bDoSlowTests=(!UE_BUILD_SHIPPING &&!UE_BUILD_TEST))
Definition AsyncLoading.cpp:1377
void RemoveNode(FEventLoadNodePtr &NodeToRemove)
Definition AsyncLoading.cpp:1231
FEventLoadNodeArray & GetArray(FEventLoadNodePtr &Node)
Definition AsyncLoading.cpp:1192
TSet< FCheckedWeakAsyncPackagePtr > PackagesWithNodes
Definition AsyncLoading.h:291
Definition AsyncLoading.h:213
FEventLoadNode PackageNodes[int(EEventLoadNode::Package_NumPhases)]
Definition AsyncLoading.h:214
void Shutdown()
Definition AsyncLoading.cpp:1140
FEventLoadNodeArray()
Definition AsyncLoading.h:223
int32 NumExports
Definition AsyncLoading.h:219
int32 NumImports
Definition AsyncLoading.h:218
int32 TotalNumberOfImportExportNodes
Definition AsyncLoading.h:216
bool RemoveNode(FEventLoadNodePtr Node)
Definition AsyncLoading.h:242
int32 TotalNumberOfNodesAdded
Definition AsyncLoading.h:217
void GetAddedNodes(TArray< FEventLoadNodePtr > &OutAddedNodes, FAsyncPackage *Owner)
Definition AsyncLoading.cpp:1146
bool AddNode(FEventLoadNodePtr Node)
Definition AsyncLoading.h:235
int32 OffsetToImports
Definition AsyncLoading.h:220
FORCEINLINE FEventLoadNode & GetNode(FEventLoadNodePtr Node, bool bCheckAdded=true)
Definition AsyncLoading.h:249
FEventLoadNode * Array
Definition AsyncLoading.h:215
int32 OffsetToExports
Definition AsyncLoading.h:221
Definition AsyncLoading.h:128
FPackageIndex ImportOrExportIndex
Definition AsyncLoading.h:130
FORCEINLINE bool operator==(const FEventLoadNodePtr &Other) const
Definition AsyncLoading.h:148
FEventLoadNodePtr()
Definition AsyncLoading.h:133
FORCEINLINE int32 NumImplicitArcs()
Definition AsyncLoading.h:155
EEventLoadNode Phase
Definition AsyncLoading.h:131
FORCEINLINE FEventLoadNodePtr GetImplicitArc()
Definition AsyncLoading.h:159
FString HumanReadableStringForDebugging() const
Definition AsyncLoading.cpp:1069
FORCEINLINE friend uint32 GetTypeHash(const FEventLoadNodePtr &NodePtr)
Definition AsyncLoading.h:137
FCheckedWeakAsyncPackagePtr WaitingPackage
Definition AsyncLoading.h:129
Definition AsyncLoading.h:192
FORCEINLINE FEventLoadNode()
Definition AsyncLoading.h:203
bool bAddedToGraph
Definition AsyncLoading.h:202
TArray< FEventLoadNodePtr > TNodesWaitingForMeArray
Definition AsyncLoading.h:194
TNodesWaitingForMeArray NodesWaitingForMe
Definition AsyncLoading.h:199
bool bFired
Definition AsyncLoading.h:201
int32 NumPrerequistes
Definition AsyncLoading.h:200
Definition AsyncLoadingThread.h:172
Definition ObjectResource.h:444
Definition AsyncLoading.h:983
~FScopedAsyncPackageEvent()
Definition AsyncLoading.cpp:1746
IAsyncPackageLoader * PreviousAsyncPackageLoader
Definition AsyncLoading.h:988
FAsyncPackage * Package
Definition AsyncLoading.h:985
FAsyncPackage * PreviousPackage
Definition AsyncLoading.h:987
Definition UObjectThreadContext.h:140
Definition AsyncLoading.h:47
FAsyncPackage * Package
Definition AsyncLoading.h:48
FORCEINLINE FAsyncPackage & GetPackage() const
Definition AsyncLoading.h:53
FORCEINLINE friend uint32 GetTypeHash(const FUnsafeWeakAsyncPackagePtr &WeakPtr)
Definition AsyncLoading.h:58
FUnsafeWeakAsyncPackagePtr(FAsyncPackage *InPackage=nullptr)
Definition AsyncLoading.h:49
FName HumanReadableStringForDebugging() const
Definition AsyncLoading.cpp:1026
FORCEINLINE bool operator==(const FUnsafeWeakAsyncPackagePtr &Other) const
Definition AsyncLoading.h:62
Definition AsyncLoading.h:71
FName HumanReadableStringForDebugging() const
Definition AsyncLoading.h:84
FName PackageName
Definition AsyncLoading.h:72
FAsyncPackage & GetPackage() const
Definition AsyncLoading.cpp:1041
FORCEINLINE bool operator==(const FWeakAsyncPackagePtr &Other) const
Definition AsyncLoading.h:80
FORCEINLINE friend uint32 GetTypeHash(const FWeakAsyncPackagePtr &WeakPtr)
Definition AsyncLoading.h:76
int32 SerialNumber
Definition AsyncLoading.h:73
Definition Optional.h:131