![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <QueuedThreadPoolWrapper.h>
Inheritance diagram for FQueuedThreadPoolWrapper:Classes | |
| class | FScheduledWork |
Public Member Functions | |
| CORE_API | FQueuedThreadPoolWrapper (FQueuedThreadPool *InWrappedQueuedThreadPool, int32 InMaxConcurrency=-1, TFunction< EQueuedWorkPriority(EQueuedWorkPriority)> InPriorityMapper=DefaultQueuedWorkPriorityWrapper) |
| CORE_API | ~FQueuedThreadPoolWrapper () |
| CORE_API void | Pause () |
| CORE_API void | Resume (int32 InNumQueuedWork=-1) |
| CORE_API void | SetMaxConcurrency (int32 MaxConcurrency=-1) |
| CORE_API void | AddQueuedWork (IQueuedWork *InQueuedWork, EQueuedWorkPriority InPriority=EQueuedWorkPriority::Normal) override |
| CORE_API bool | RetractQueuedWork (IQueuedWork *InQueuedWork) override |
| CORE_API int32 | GetNumThreads () const override |
| int32 | GetCurrentConcurrency () const |
Public Member Functions inherited from FQueuedThreadPool | |
| virtual bool | CreateForkable (uint32 InNumQueuedThreads, uint32 StackSize=(32 *1024), EThreadPriority ThreadPriority=TPri_Normal, const TCHAR *Name=TEXT("UnknownThreadPool")) |
| CORE_API | FQueuedThreadPool () |
| virtual CORE_API | ~FQueuedThreadPool () |
Protected Member Functions | |
| virtual int32 | GetMaxConcurrency () const |
| virtual void | OnScheduled (const IQueuedWork *) |
| virtual void | OnUnscheduled (const IQueuedWork *) |
| virtual FScheduledWork * | AllocateScheduledWork () |
Protected Attributes | |
| FCriticalSection | Lock |
| FThreadPoolPriorityQueue | QueuedWork |
Additional Inherited Members | |
Static Public Member Functions inherited from FQueuedThreadPool | |
| static CORE_API FQueuedThreadPool * | Allocate () |
Static Public Attributes inherited from FQueuedThreadPool | |
| static CORE_API uint32 | OverrideStackSize = 0 |
ThreadPool wrapper implementation allowing to schedule up to MaxConcurrency tasks at a time making sub-partitioning another thread-pool a breeze and allowing more fine-grained control over scheduling by effectively giving another set of priorities.
| FQueuedThreadPoolWrapper::FQueuedThreadPoolWrapper | ( | FQueuedThreadPool * | InWrappedQueuedThreadPool, |
| int32 | InMaxConcurrency = -1, |
||
| TFunction< EQueuedWorkPriority(EQueuedWorkPriority)> | InPriorityMapper = DefaultQueuedWorkPriorityWrapper |
||
| ) |
InWrappedQueuedThreadPool Underlying thread pool to schedule task to. InMaxConcurrency Maximum number of concurrent tasks allowed, -1 will limit concurrency to number of threads available in the underlying thread pool. InPriorityMapper Thread-safe function used to map any priority from this Queue to the priority that should be used when scheduling the task on the underlying thread pool.
| FQueuedThreadPoolWrapper::~FQueuedThreadPoolWrapper | ( | ) |
|
overridevirtual |
Checks to see if there is a thread available to perform the task. If not, it queues the work for later. Otherwise it is immediately dispatched.
| InQueuedWork | The work that needs to be done asynchronously |
| InQueuedWorkPriority | The priority at which to process this task |
Implements FQueuedThreadPool.
|
inlineprotectedvirtual |
|
inline |
|
overridevirtual |
Get the number of queued threads
Implements FQueuedThreadPool.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
| void FQueuedThreadPoolWrapper::Pause | ( | ) |
Queued task are not scheduled against the wrapped thread-pool until resumed
Resume a specified amount of queued work, or -1 to unpause.
|
overridevirtual |
Attempts to retract a previously queued task.
| InQueuedWork | The work to try to retract |
Implements FQueuedThreadPool.
Dynamically adjust the maximum number of concurrent tasks, -1 for unlimited.
|
protected |
|
protected |