6#include "Containers/Array.h"
7#include "GenericPlatform/GenericPlatformAffinity.h"
8#include "Templates/Function.h"
28 case EQueuedWorkPriority::Blocking:
29 return TEXT(
"Blocking");
30 case EQueuedWorkPriority::Highest:
31 return TEXT(
"Highest");
32 case EQueuedWorkPriority::High:
34 case EQueuedWorkPriority::Normal:
35 return TEXT(
"Normal");
36 case EQueuedWorkPriority::Low:
38 case EQueuedWorkPriority::Lowest:
39 return TEXT(
"Lowest");
42 return TEXT(
"Unknown");
47
48
49
50
57
58
62
63
67
68
72
73
77
78
82
83
84 int32
Num()
const {
return NumQueuedWork; }
87
88
98
99
100
101
102
107
108
109
110
111
112
113
114
121
122
123
124
125
126
127
131
132
133
134
135
136
140
141
151
152
153
154
158
159
160
161
166
167
175extern FQueuedThreadPool* GLargeThreadPool;
FQueuedThreadPool * GBackgroundPriorityThreadPool
FQueuedThreadPool * GThreadPool
const TCHAR * LexToString(EQueuedWorkPriority Priority)
FQueuedThreadPool * GIOThreadPool
virtual bool Create(uint32 InNumQueuedThreads, uint32 StackSize=(32 *1024), EThreadPriority ThreadPriority=TPri_Normal, const TCHAR *Name=TEXT("UnknownThreadPool"))=0
virtual ~FQueuedThreadPool()
static FQueuedThreadPool * Allocate()
virtual int32 GetNumThreads() const =0
virtual bool RetractQueuedWork(IQueuedWork *InQueuedWork)=0
virtual void AddQueuedWork(IQueuedWork *InQueuedWork, EQueuedWorkPriority InQueuedWorkPriority=EQueuedWorkPriority::Normal)=0
static uint32 OverrideStackSize
IQueuedWork * Peek(EQueuedWorkPriority *OutDequeuedWorkPriority=nullptr) const
bool Retract(IQueuedWork *InQueuedWork)
int32 FirstNonEmptyQueueIndex
void Sort(EQueuedWorkPriority InPriorityBucket, TFunctionRef< bool(const IQueuedWork *A, const IQueuedWork *B)> Predicate)
TAtomic< int32 > NumQueuedWork
IQueuedWork * Dequeue(EQueuedWorkPriority *OutDequeuedWorkPriority=nullptr)
FThreadPoolPriorityQueue()
void Enqueue(IQueuedWork *InQueuedWork, EQueuedWorkPriority InPriority=EQueuedWorkPriority::Normal)