Navigation
API > API/Runtime > API/Runtime/Core
| Name | FScheduler |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Async/Fundamental/Scheduler.h |
| Include Path | #include "Async/Fundamental/Scheduler.h" |
Syntax
class FScheduler : public LowLevelTasks::FSchedulerTls
Inheritance Hierarchy
- FSchedulerTls → FScheduler
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FScheduler
(
const FScheduler& |
Async/Fundamental/Scheduler.h | ||
FScheduler
(
FScheduler&& |
Async/Fundamental/Scheduler.h | ||
FScheduler () |
Async/Fundamental/Scheduler.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FScheduler() |
Async/Fundamental/Scheduler.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FConditional | TTaskDelegate< bool(), 16 > | Using 16 bytes here because it fits the vtable and one additional pointer | Async/Fundamental/Scheduler.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Singleton | FScheduler | Async/Fundamental/Scheduler.h | |
| WorkerSpinCycles | uint32 | Async/Fundamental/Scheduler.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveWorkers | std::atomic_uint | Async/Fundamental/Scheduler.h | ||
| BackgroundAffinity | uint64 | Async/Fundamental/Scheduler.h | ||
| BackgroundCreationIndex | std::atomic< int32 > | Async/Fundamental/Scheduler.h | ||
| BackgroundPriority | EThreadPriority | Async/Fundamental/Scheduler.h | ||
| ForegroundCreationIndex | std::atomic< int32 > | Async/Fundamental/Scheduler.h | ||
| GameThreadLocalQueue | TUniquePtr< FSchedulerTls::FLocalQueueType > | Async/Fundamental/Scheduler.h | ||
| NextWorkerId | std::atomic_uint | Async/Fundamental/Scheduler.h | ||
| OversubscriptionLimitReachedEvent | FOversubscriptionLimitReached | Async/Fundamental/Scheduler.h | ||
| QueueRegistry | FSchedulerTls::FQueueRegistry | Async/Fundamental/Scheduler.h | ||
| TemporaryShutdown | std::atomic_bool | Async/Fundamental/Scheduler.h | ||
| WaitingQueue | Private::FWaitingQueue | Async/Fundamental/Scheduler.h | ||
| WorkerAffinity | uint64 | Async/Fundamental/Scheduler.h | ||
| WorkerEvents | TAlignedArray< Private::FWaitEvent > | Async/Fundamental/Scheduler.h | ||
| WorkerLocalQueues | TAlignedArray< FSchedulerTls::FLocalQueueType > | Async/Fundamental/Scheduler.h | ||
| WorkerPriority | EThreadPriority | Async/Fundamental/Scheduler.h | ||
| WorkerThreads | TUniquePtr< std::atomic< FThread * >[]> | Async/Fundamental/Scheduler.h | ||
| WorkerThreadsCS | UE::FPlatformRecursiveMutex | Async/Fundamental/Scheduler.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
EThreadPriority GetBackgroundPriority() |
Get the background priority set when workers were started | Async/Fundamental/Scheduler.h | |
uint32 GetMaxNumWorkers() |
Maximum number of workers, including standby workers (Oversubscription) | Async/Fundamental/Scheduler.h | |
uint32 GetNumWorkers() |
Number of instantiated workers | Async/Fundamental/Scheduler.h | |
FOversubscriptionLimitReached & GetOversubscriptionLimitReachedEvent () |
Event that will fire when the scheduler has reached its oversubscription limit (all threads are waiting). | Async/Fundamental/Scheduler.h | |
EThreadPriority GetWorkerPriority() |
Get the worker priority set when workers were started | Async/Fundamental/Scheduler.h | |
bool IsOversubscriptionLimitReached
(
ETaskPriority TaskPriority |
Determine if we're currently out of workers for a given task priority | Async/Fundamental/Scheduler.h | |
void RestartWorkers
(
uint32 NumForegroundWorkers, |
Async/Fundamental/Scheduler.h | ||
void StartWorkers
(
uint32 NumForegroundWorkers, |
Start number of workers where 0 is the system default | Async/Fundamental/Scheduler.h | |
void StopWorkers
(
bool DrainGlobalQueue |
Async/Fundamental/Scheduler.h | ||
bool TryLaunch
(
FTask& Task, |
Try to launch the task, the return value will specify if the task was in the ready state and has been launched | Async/Fundamental/Scheduler.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FScheduler & Get() |
Async/Fundamental/Scheduler.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FScheduler & operator=
(
FScheduler&& |
Async/Fundamental/Scheduler.h | ||
FScheduler & operator=
(
const FScheduler& |
Async/Fundamental/Scheduler.h |