FRunnableThread::SetThreadAffinity

Changes the thread affinity of the currently running thread

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/HAL/RunnableThread.h

Include

#include "HAL/RunnableThread.h"

Syntax

virtual bool SetThreadAffinity
(
    const FThreadAffinity & Affinity
)

Remarks

Changes the thread affinity of the currently running thread

Returns

returns true if the affinity changed, false if affinity did not change

Parameters

Parameter

Description

ThreadAffinityMask

The thread affinity to change to (can be 0 to keep previously set affinity mask)

ProcessorGroup

The thread group to change to