![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <QueuedThreadPool.h>
Inheritance diagram for FQueuedThreadPool:Public Member Functions | |
| virtual bool | Create (uint32 InNumQueuedThreads, uint32 StackSize=(32 *1024), EThreadPriority ThreadPriority=TPri_Normal, const TCHAR *Name=TEXT("UnknownThreadPool"))=0 |
| virtual bool | CreateForkable (uint32 InNumQueuedThreads, uint32 StackSize=(32 *1024), EThreadPriority ThreadPriority=TPri_Normal, const TCHAR *Name=TEXT("UnknownThreadPool")) |
| virtual void | Destroy ()=0 |
| virtual void | AddQueuedWork (IQueuedWork *InQueuedWork, EQueuedWorkPriority InQueuedWorkPriority=EQueuedWorkPriority::Normal)=0 |
| virtual bool | RetractQueuedWork (IQueuedWork *InQueuedWork)=0 |
| virtual int32 | GetNumThreads () const =0 |
| CORE_API | FQueuedThreadPool () |
| virtual CORE_API | ~FQueuedThreadPool () |
Static Public Member Functions | |
| static CORE_API FQueuedThreadPool * | Allocate () |
Static Public Attributes | |
| static CORE_API uint32 | OverrideStackSize = 0 |
Interface for queued thread pools.
This interface is used by all queued thread pools. It used as a callback by FQueuedThreads and is used to queue asynchronous work for callers.
|
default |
|
virtualdefault |
|
pure virtual |
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 |
Implemented in FQueuedThreadPoolWrapper, FQueuedThreadPoolDynamicWrapper, and FQueuedThreadPoolBase.
|
static |
Allocates a thread pool
|
pure virtual |
Creates the thread pool with the specified number of threads
| InNumQueuedThreads | Specifies the number of threads to use in the pool |
| StackSize | The size of stack the threads in the pool need (32K default) |
| ThreadPriority | priority of new pool thread |
| Name | optional name for the pool to be used for instrumentation |
Implemented in FQueuedLowLevelThreadPool, FQueuedThreadPoolBase, and FQueuedThreadPoolTaskGraphWrapper.
|
inlinevirtual |
Creates the thread pool with the specified number of forkable threads (see FForkProcessHelper)
Currently only works after the process has been forked because GetSingleThreadInterface() isn't implemented for pooled threads
| InNumQueuedThreads | Specifies the number of threads to use in the pool |
| StackSize | The size of stack the threads in the pool need (32K default) |
| ThreadPriority | priority of new pool thread |
| Name | optional name for the pool to be used for instrumentation |
Reimplemented in FQueuedThreadPoolBase.
Tells the pool to clean up all background threads
Implemented in FQueuedThreadPoolTaskGraphWrapper, FQueuedLowLevelThreadPool, and FQueuedThreadPoolBase.
Get the number of queued threads
Implemented in FQueuedThreadPoolBase, and FQueuedThreadPoolWrapper.
|
pure virtual |
Attempts to retract a previously queued task.
| InQueuedWork | The work to try to retract |
Implemented in FQueuedThreadPoolBase, and FQueuedThreadPoolWrapper.
|
static |
Stack size for threads created for the thread pool. Can be overridden by other projects. If 0 means to use the value passed in the Create method.