6#include "Containers/Array.h"
7#include "Containers/UnrealString.h"
8#include "HAL/PlatformTLS.h"
9#include "HAL/PlatformAffinity.h"
15
16
17
18
24 friend class FForkableThread;
36
37
38
39
40
41
42
43
46 const TCHAR* ThreadName,
47 uint32 InStackSize = 0,
53
54
55
56
60
61
62
63
64
65
69
70
71
72
73
74 virtual void Suspend(
bool bShouldPause =
true ) = 0;
77
78
79
80
81
82
83
84
85
86 virtual bool Kill(
bool bShouldWait =
true ) = 0;
109
110
111
112
113
120
121
122
123
124
143
144
148 return RunnableThread;
154
155
156
157
158
159
160
161
163 uint32 InStackSize = 0,
200
201
204 checkf(
false, TEXT(
"Only forkable threads should receive OnPostFork."));
208
209
#define checkf(expr, format,...)
static void SetupCreatedThread(FRunnableThread *&NewThread, class FRunnable *InRunnable, const TCHAR *ThreadName, uint32 InStackSize, EThreadPriority InThreadPri, uint64 InThreadAffinityMask, EThreadCreateFlags InCreateFlags)
static uint32 GetTlsSlot()
void PostCreate(EThreadPriority ThreadPriority)
virtual void WaitForCompletion()=0
static FRunnableThread * Create(class FRunnable *InRunnable, const TCHAR *ThreadName, uint32 InStackSize=0, EThreadPriority InThreadPri=TPri_Normal, uint64 InThreadAffinityMask=FPlatformAffinity::GetNoAffinityMask(), EThreadCreateFlags InCreateFlags=EThreadCreateFlags::None)
EThreadPriority ThreadPriority
EThreadPriority GetThreadPriority() const
FEvent * ThreadInitSyncEvent
virtual FRunnableThread::ThreadType GetThreadType() const
const uint32 GetThreadID() const
virtual bool CreateInternal(FRunnable *InRunnable, const TCHAR *InThreadName, uint32 InStackSize=0, EThreadPriority InThreadPri=TPri_Normal, uint64 InThreadAffinityMask=0, EThreadCreateFlags InCreateFlags=EThreadCreateFlags::None)=0
virtual void SetThreadPriority(EThreadPriority NewPriority)=0
virtual bool SetThreadAffinity(const FThreadAffinity &Affinity)
virtual void Suspend(bool bShouldPause=true)=0
static FRunnableThread * GetRunnableThread()
virtual void OnPostFork()
static uint32 RunnableTlsSlot
virtual ~FRunnableThread()
uint64 ThreadAffinityMask
virtual bool Kill(bool bShouldWait=true)=0
const FString & GetThreadName() const