engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 静态 Public 属性 | 所有成员列表
FQueuedThreadPool类 参考abstract

Interface for queued thread pools. 更多...

#include <QueuedThreadPool.h>

Public 成员函数

virtual void AddQueuedWork (IQueuedWork *InQueuedWork)=0
 Checks to see if there is a thread available to perform the task. 更多...
 
virtual bool Create (uint32 InNumQueuedThreads, uint32 StackSize=(32 *1024), EThreadPriority ThreadPriority=TPri_Normal, const TCHAR *Name=TEXT("UnknownThreadPool"))=0
 Creates the thread pool with the specified number of threads 更多...
 
virtual void Destroy ()=0
 Tells the pool to clean up all background threads
 
virtual int32 GetNumThreads () const =0
 Get the number of queued threads
 
virtual bool RetractQueuedWork (IQueuedWork *InQueuedWork)=0
 Attempts to retract a previously queued task. 更多...
 

静态 Public 成员函数

static CORE_API FQueuedThreadPool * Allocate ()
 Allocates a thread pool 更多...
 

静态 Public 属性

static CORE_API uint32 OverrideStackSize
 Stack size for threads created for the thread pool. 更多...
 

详细描述

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.

成员函数说明

◆ AddQueuedWork()

virtual void FQueuedThreadPool::AddQueuedWork ( IQueuedWork *  InQueuedWork)
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.

参数
InQueuedWorkThe work that needs to be done asynchronously
参见
RetractQueuedWork

◆ Allocate()

static CORE_API FQueuedThreadPool * FQueuedThreadPool::Allocate ( )
static

Allocates a thread pool

返回
A new thread pool.

◆ Create()

virtual bool FQueuedThreadPool::Create ( uint32  InNumQueuedThreads,
uint32  StackSize = (32 *1024),
EThreadPriority  ThreadPriority = TPri_Normal,
const TCHAR *  Name = TEXT("UnknownThreadPool") 
)
pure virtual

Creates the thread pool with the specified number of threads

参数
InNumQueuedThreadsSpecifies the number of threads to use in the pool
StackSizeThe size of stack the threads in the pool need (32K default)
ThreadPrioritypriority of new pool thread
Nameoptional name for the pool to be used for instrumentation
返回
Whether the pool creation was successful or not

◆ RetractQueuedWork()

virtual bool FQueuedThreadPool::RetractQueuedWork ( IQueuedWork *  InQueuedWork)
pure virtual

Attempts to retract a previously queued task.

参数
InQueuedWorkThe work to try to retract
返回
true if the work was retracted
参见
AddQueuedWork

类成员变量说明

◆ OverrideStackSize

CORE_API uint32 FQueuedThreadPool::OverrideStackSize
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.


该类的文档由以下文件生成: