/Engine/Source/Runtime/Core/Public/Misc/PreloadableFile.h
This class is not threadsafe. The public interface can be used at the same time as internal asynchronous tasks are executing, but the public interface can not be used from multiple threads at once.
class FPreloadableArchive : public [FArchive](API\Runtime\Core\Serialization\FArchive)
FString
ArchiveName
TUniquePtr<IAs...
AsynchronousHandle
The handle used for PreloadBytes mode, to fulfull ReadReqeusts.
TAtomic< bool >
bInitialized
Threadsafe variable that returns true only after all asynchronous initialization is complete.
bool
bIsInlineReadComplete
Set to true during the ReadRequest call to allow us to detect if OnReadComplete is called inline on the same thread from ReadRequest.
TAtomic< bool >
bIsPreloading
Threadsafe variable that is true only during the period between initialization until Preloading stops (either due to EOF reached or due to Serialize turning it off.
TAtomic< bool >
bIsPreloadingPaused
Variable that is set to true from the public interface thread to signal that (temporarily) no further ReadRequests should be sent when the currently active one completes.
bool
bReadCompleteWasCalledInline
Set to true if OnReadComplete is called inline on the same thread from ReadRequest; we need special handling for this case.
uint8 *
CacheBytes
An array of bytes of size Size.
TAtomic< int64 ...
CacheEnd
Number of bytes in CacheBytes that have already been read.
int64
PageSize
The number of bytes requested from the AsynchronousHandle in each ReadRequest.
FEvent*
PendingAsyncComplete
An Event used for synchronization with asynchronous tasks - InitializingAsync or receiving ReadRequests from the AsynchronousHandle.
int64
Pos
The Offset into the file or preloaded bytes that will be used in the next call to Serialize.
FCriticalSectio...
PreloadLock
CriticalSection used to synchronize access to the CacheBytes.
TArray<IAsyncR...
RetiredRequests
ReadRequests that have completed but we have not yet deleted.
FPreloadableArc...
SavedReadCompleteArguments
int64
Size
The number of bytes in the file.
TUniquePtr<FAr...
SynchronousArchive
The archive used in PreloadHandle mode or to service Serialize requests that are beyond CacheEnd when in PreloadBytes mode.