Ark Server API (ASA) - Wiki
|
#include <QueuedThreadPoolWrapper.h>
Classes | |
struct | FQueuedWorkInternalData |
Public Member Functions | |
FQueuedLowLevelThreadPool (TFunction< EQueuedWorkPriority(EQueuedWorkPriority)> InPriorityMapper=[](EQueuedWorkPriority InPriority) { return InPriority;}, LowLevelTasks::FScheduler *InScheduler=&LowLevelTasks::FScheduler::Get()) | |
~FQueuedLowLevelThreadPool () | |
void * | operator new (size_t size) |
void | operator delete (void *ptr) |
void | Pause () |
void | Resume (int32 InNumQueuedWork=-1) |
Public Member Functions inherited from FQueuedThreadPool | |
FQueuedThreadPool () | |
virtual | ~FQueuedThreadPool () |
Protected Member Functions | |
bool | Create (uint32 InNumQueuedThreads, uint32 InStackSize, EThreadPriority InThreadPriority, const TCHAR *InName) override |
void | Destroy () override |
Private Attributes | |
FAAArrayQueue< FQueuedWorkInternalData > | PendingWork [int32(EQueuedWorkPriority::Count)] |
LowLevelTasks::FScheduler * | Scheduler = nullptr |
TFunction< EQueuedWorkPriority(EQueuedWorkPriority)> | PriorityMapper |
std::atomic_uint | TaskCount {0} |
std::atomic_bool | bIsExiting {false} |
std::atomic_bool | bIsPaused {false} |
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 the low level backend which is also used by the taskgraph.
Definition at line 356 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 underlying thread pool.
Definition at line 372 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 452 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 501 of file QueuedThreadPoolWrapper.h.
|
inlineprivate |
Definition at line 539 of file QueuedThreadPoolWrapper.h.
|
inlineoverrideprotectedvirtual |
Tells the pool to clean up all background threads
Implements FQueuedThreadPool.
Definition at line 506 of file QueuedThreadPoolWrapper.h.
|
inlineprivate |
Definition at line 552 of file QueuedThreadPoolWrapper.h.
|
inlineprivate |
|
inlineoverrideprivatevirtual |
Get the number of queued threads
Implements FQueuedThreadPool.
Definition at line 495 of file QueuedThreadPoolWrapper.h.
|
inline |
Queued task are not scheduled against the wrapped thread-pool until resumed
Definition at line 395 of file QueuedThreadPoolWrapper.h.
Resume a specified amount of queued work, or -1 to unpause.
Definition at line 403 of file QueuedThreadPoolWrapper.h.
|
inlineoverrideprivatevirtual |
Attempts to retract a previously queued task.
InQueuedWork | The work to try to retract |
Implements FQueuedThreadPool.
Definition at line 481 of file QueuedThreadPoolWrapper.h.
Definition at line 426 of file QueuedThreadPoolWrapper.h.
|
private |
Definition at line 561 of file QueuedThreadPoolWrapper.h.
|
private |
Definition at line 562 of file QueuedThreadPoolWrapper.h.
|
private |
Definition at line 537 of file QueuedThreadPoolWrapper.h.
|
private |
Definition at line 558 of file QueuedThreadPoolWrapper.h.
|
private |
Definition at line 557 of file QueuedThreadPoolWrapper.h.
|
private |
Definition at line 560 of file QueuedThreadPoolWrapper.h.