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.
|
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 |
|
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 |
|
pure virtual |
Attempts to retract a previously queued task.
| InQueuedWork | The work to try to retract |
|
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.