UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Fork.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
7
8#ifndef DEFAULT_SERVER_FAKE_FORKS
9 // Defines if the server process should always simulate forking even on platforms that do not support it.
10 #define DEFAULT_SERVER_FAKE_FORKS 0
11#endif
12
13#ifndef DEFAULT_FORK_PROCESS_MULTITHREAD
14 // Defines if forked child processes should support multithreading by default
15 #define DEFAULT_FORK_PROCESS_MULTITHREAD 0
16#endif
17
18class FRunnable;
19class FRunnableThread;
20
22{
23 Parent,
24 Child,
25};
26
126
127
128
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EForkProcessRole
Definition Fork.h:22
EThreadPriority
Definition GenericPlatformAffinity.h:26
@ TPri_Normal
Definition GenericPlatformAffinity.h:27
EThreadCreateFlags
Definition GenericPlatformAffinity.h:38
uint8_t uint8
Definition binka_ue_file_header.h:8
uint16_t uint16
Definition binka_ue_file_header.h:7
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Fork.h:41
static CORE_API void SetIsForkedChildProcess(uint16 ChildIndex=1)
Definition Fork.cpp:69
static CORE_API bool IsForkedChildProcess()
Definition Fork.cpp:64
static CORE_API void LowLevelPostForkChild(uint16 ChildIndex=1)
Definition Fork.cpp:137
static CORE_API FRunnableThread * CreateForkableThread(class FRunnable *InRunnable, const TCHAR *InThreadName, uint32 InStackSize=0, EThreadPriority InThreadPri=TPri_Normal, uint64 InThreadAffinityMask=FPlatformAffinity::GetNoAffinityMask(), EThreadCreateFlags InCreateFlags=EThreadCreateFlags::None, bool bAllowPreFork=false)
Definition ThreadingBase.cpp:1712
static CORE_API void LowLevelPreFork()
Definition Fork.cpp:127
static CORE_API void LowLevelPostForkParent()
Definition Fork.cpp:132
static CORE_API bool IsForkRequested()
Definition Fork.cpp:80
static CORE_API void OnForkingOccured()
Definition Fork.cpp:86
static CORE_API bool SupportsMultithreadingPostFork()
Definition Fork.cpp:108
static CORE_API uint16 GetForkedChildProcessIndex()
Definition Fork.cpp:75
static CORE_API bool IsForkedMultithreadInstance()
Definition Fork.cpp:103
static const uint64 GetNoAffinityMask()
Definition GenericPlatformAffinity.h:88
Definition RunnableThread.h:20
Definition Runnable.h:20