FForkProcessHelper::CreateForkableThread

Creates a thread according to the environment it's in: In environments with SupportsMultithreading: create a real thread that will tick the runnable object itself In environments without multithreading: create a fake thread that is ticked by the main thread.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/Fork.h

Include

#include "Misc/Fork.h"

Source

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

Syntax

static FRunnableThread * CreateForkableThread
(
    class FRunnable * InRunnable,
    const TCHAR * InThreadName,
    uint32 InStackSize,
    EThreadPriority InThreadPri,
    uint64 InThreadAffinityMask,
    EThreadCreateFlags InCreateFlags
)

Remarks

Creates a thread according to the environment it's in: In environments with SupportsMultithreading: create a real thread that will tick the runnable object itself In environments without multithreading: create a fake thread that is ticked by the main thread. In environments without multithreading but that allows multithreading post-fork: If called on the original master process: will create a forkable thread that is ticked in the main thread pre-fork but becomes a real thread post-fork If called on a forked child process: will create a real thread immediately

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