ExecuteOnRHIThread

Utility function for easily running a [TFunctionRef](API\Runtime\Core\GenericPlatform\TFunctionRef) on the RHI thread.

Windows
MacOS
Linux

References

Module

HeadMountedDisplay

Header

/Engine/Source/Runtime/HeadMountedDisplay/Public/XRThreadUtils.h

Include

#include "XRThreadUtils.h"

Source

/Engine/Source/Runtime/HeadMountedDisplay/Private/XRThreadUtils.cpp

Syntax

void ExecuteOnRHIThread
(
    const TFunctionRef< void()> & Function
)

Remarks

Utility function for easily running a TFunctionRef on the RHI thread. Must be invoked from the render thread. If RHI does not run on a separate thread, the TFunction will be executed on the current thread. This method will flush the RHI command list meaning that the function will be executed before ExecuteOnRHIThread returns.

Parameters

Parameter

Description

Function

the Function to be invoked on the RHI thread.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss