FThread::FThread

Creates and immediately starts a new system thread that will execute `ThreadFunction_ argument.

Windows
MacOS
Linux

References

Module

Core

Header

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

Include

#include "HAL/Thread.h"

Source

/Engine/Source/Runtime/Core/Private/HAL/Thread.cpp

Syntax

FThread
(
    TCHAR const * ThreadName,
    TUniqueFunction< void()> && ThreadFunction,
    uint32 StackSize,
    EThreadPriority ThreadPriority,
    uint64 ThreadAffinityMask
)

Remarks

Creates and immediately starts a new system thread that will execute `ThreadFunction_ argument. Can return before the thread is actually started or when it already finished execution.

Parameters

Parameter

Description

ThreadName

Name of the thread

ThreadFunction

The function that will be executed by the newly created thread

StackSize

The size of the stack to create. 0 means use the current thread's stack size

ThreadPriority

Tells the thread whether it needs to adjust its priority or not. Defaults to normal priority

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