Ark Server API (ASA) - Wiki
|
#include <QueuedThreadPoolWrapper.h>
Public Member Functions | |
FQueuedThreadPoolTaskGraphWrapper (TFunction< ENamedThreads::Type(EQueuedWorkPriority)> InPriorityMapper=nullptr) | |
FQueuedThreadPoolTaskGraphWrapper (ENamedThreads::Type InDesiredThread) | |
~FQueuedThreadPoolTaskGraphWrapper () | |
Public Member Functions inherited from FQueuedThreadPool | |
FQueuedThreadPool () | |
virtual | ~FQueuedThreadPool () |
Protected Member Functions | |
bool | Create (uint32 InNumQueuedThreads, uint32 StackSize, EThreadPriority ThreadPriority, const TCHAR *Name) override |
void | Destroy () override |
Private Member Functions | |
void | AddQueuedWork (IQueuedWork *InQueuedWork, EQueuedWorkPriority InPriority=EQueuedWorkPriority::Normal) override |
bool | RetractQueuedWork (IQueuedWork *InQueuedWork) override |
void | OnTaskCompleted (IQueuedWork *InQueuedWork) |
int32 | GetNumThreads () const override |
ENamedThreads::Type | GetDefaultPriorityMapping (EQueuedWorkPriority InQueuedWorkPriority) |
Private Attributes | |
TFunction< ENamedThreads::Type(EQueuedWorkPriority)> | PriorityMapper |
TAtomic< uint32 > | TaskCount |
TAtomic< bool > | bIsExiting |
Additional Inherited Members | |
Static Public Member Functions inherited from FQueuedThreadPool | |
static FQueuedThreadPool * | Allocate () |
Static Public Attributes inherited from FQueuedThreadPool | |
static uint32 | OverrideStackSize |
ThreadPool wrapper implementation allowing to schedule thread-pool tasks on the task graph.
Definition at line 245 of file QueuedThreadPoolWrapper.h.
|
inline |
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 task graph.
Definition at line 251 of file QueuedThreadPoolWrapper.h.
|
inline |
InDesiredThread The task-graph desired thread and priority.
Definition at line 268 of file QueuedThreadPoolWrapper.h.
|
inline |
|
inlineoverrideprivatevirtual |
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.
Definition at line 280 of file QueuedThreadPoolWrapper.h.
|
inlineoverrideprotectedvirtual |
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 |
Implements FQueuedThreadPool.
Definition at line 327 of file QueuedThreadPoolWrapper.h.
|
inlineoverrideprotectedvirtual |
Tells the pool to clean up all background threads
Implements FQueuedThreadPool.
Definition at line 332 of file QueuedThreadPoolWrapper.h.
|
inlineprivate |
Definition at line 313 of file QueuedThreadPoolWrapper.h.
|
inlineoverrideprivatevirtual |
Get the number of queued threads
Implements FQueuedThreadPool.
Definition at line 308 of file QueuedThreadPoolWrapper.h.
|
inlineprivate |
Definition at line 303 of file QueuedThreadPoolWrapper.h.
|
inlineoverrideprivatevirtual |
Attempts to retract a previously queued task.
InQueuedWork | The work to try to retract |
Implements FQueuedThreadPool.
Definition at line 297 of file QueuedThreadPoolWrapper.h.
Definition at line 351 of file QueuedThreadPoolWrapper.h.
|
private |
Definition at line 349 of file QueuedThreadPoolWrapper.h.
Definition at line 350 of file QueuedThreadPoolWrapper.h.