UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
BuildPatchServices::AsyncHelpers Namespace Reference

Functions

template<typename IntegerType >
void LockFreePeak (volatile IntegerType *PeakValue, IntegerType NewSample)
 

Detailed Description

Helper functions for wrapping async functionality.

Additional atomic functionality

Function Documentation

◆ LockFreePeak()

template<typename IntegerType >
void BuildPatchServices::AsyncHelpers::LockFreePeak ( volatile IntegerType *  PeakValue,
IntegerType  NewSample 
)

LockFreePeak will set the destination value, to NewSample, if NewSample is higher. This works by spinning on InterlockedCompareExchange. For other usage examples see reference code in GenericPlatformAtomics.h

Parameters
PeakValueThe destination variable to set.
NewSampleThe sample to set with if higher.