/Engine/Plugins/Runtime/XRBase/Source/XRBase/Public/XRThreadUtils.h
Utility function for easily running aTFunctionRefon the RHI thread. Must be invoked from the render thread. If RHI does not run on a separate thread, theTFunctionwill be executed on the current thread. This method will flush the RHI command list meaning that the function will be executed before ExecuteOnRHIThread returns.
void ExecuteOnRHIThread ( const [TFunctionRef](API\Runtime\Core\GenericPlatform\TFunctionRef)< void([FRHICommandListImmediate](API\Runtime\RHI\FRHICommandListImmediate) &)> & Function )