Navigation
API > API/Runtime > API/Runtime/Core
Priority Queue tailored for FQueuedThreadPool implementation
This class is NOT thread-safe and must be properly protected.
| Name | FThreadPoolPriorityQueue |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/QueuedThreadPool.h |
| Include Path | #include "Misc/QueuedThreadPool.h" |
Syntax
class FThreadPoolPriorityQueue
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FThreadPoolPriorityQueue() |
Misc/QueuedThreadPool.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FirstNonEmptyQueueIndex | int32 | The first queue to extract a work item from to avoid scanning all priorities when unqueuing. | Misc/QueuedThreadPool.h | |
| NumQueuedWork | TAtomic< int32 > | Misc/QueuedThreadPool.h | ||
| PriorityQueuedWork | TArray< TArray< IQueuedWork * >, TInlineAllocator< static_cast< int32 >(EQueuedWorkPriority::Lowest)+1 > > | Misc/QueuedThreadPool.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
IQueuedWork * Dequeue
(
EQueuedWorkPriority* OutDequeuedWorkPriority |
Get the next work item in priority order. | Misc/QueuedThreadPool.h | |
void Enqueue
(
IQueuedWork* InQueuedWork, |
Enqueue a work item at specified priority | Misc/QueuedThreadPool.h | |
int32 Num() |
Get the total number of queued items. | Misc/QueuedThreadPool.h | |
IQueuedWork * Peek
(
EQueuedWorkPriority* OutDequeuedWorkPriority |
Get the next work item in priority order without actually dequeuing. | Misc/QueuedThreadPool.h | |
void Reset() |
Empty the queue. | Misc/QueuedThreadPool.h | |
bool Retract
(
IQueuedWork* InQueuedWork |
Search and remove a queued work item from the list | Misc/QueuedThreadPool.h | |
void Sort
(
EQueuedWorkPriority InPriorityBucket, |
Sort Priority Bucket given Predicate | Misc/QueuedThreadPool.h |