Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Misc
Inheritance Hierarchy
- FQueuedThreadPool
- FQueuedThreadPoolWrapper
- FQueuedThreadPoolDynamicWrapper
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Misc/QueuedThreadPoolWrapper.h |
| Include | #include "Misc/QueuedThreadPoolWrapper.h" |
Syntax
class FQueuedThreadPoolWrapper : public FQueuedThreadPool
Remarks
ThreadPool wrapper implementation allowing to schedule up to MaxConcurrency tasks at a time making sub-partitioning another thread-pool a breeze and allowing more fine-grained control over scheduling by effectively giving another set of priorities.
Variables
| Type | Name | Description | |
|---|---|---|---|
| FCriticalSection | Lock | A critical section is used since we need reentrancy support from the same thread. | |
| FThreadPoolPriorityQueue | QueuedWork |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FQueuedThreadPoolWrapper
(
FQueuedThreadPool* InWrappedQueuedThreadPool, |
InWrappedQueuedThreadPool Underlying thread pool to schedule task to. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| FScheduledWork * | Can be overriden to allocate a more specialized version if needed. | ||
| int32 | |||
| int32 | Can be overriden to dynamically control the maximum concurrency. | ||
| void | OnScheduled
(
const IQueuedWork* |
Can be overriden to know when work has been scheduled. | |
| void | OnUnscheduled
(
const IQueuedWork* |
Can be overriden to know when work has been unscheduled. | |
| void | Pause () |
Queued task are not scheduled against the wrapped thread-pool until resumed | |
| void | Resume
(
int32 InNumQueuedWork |
Resume a specified amount of queued work, or -1 to unpause. | |
| void | SetMaxConcurrency
(
int32 MaxConcurrency |
Dynamically adjust the maximum number of concurrent tasks, -1 for unlimited. |
Overridden from FQueuedThreadPool
| Type | Name | Description | |
|---|---|---|---|
| void | AddQueuedWork
(
IQueuedWork* InQueuedWork, |
Checks to see if there is a thread available to perform the task. | |
| int32 | Get the number of queued threads | ||
| bool | RetractQueuedWork
(
IQueuedWork* InQueuedWork |
Attempts to retract a previously queued task. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FScheduledWork |