Navigation
API > API/Runtime > API/Runtime/Core
Interface to the task graph system
| Name | FTaskGraphInterface |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Async/TaskGraphInterfaces.h |
| Include Path | #include "Async/TaskGraphInterfaces.h" |
Syntax
class FTaskGraphInterface
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FTaskGraphInterface() |
Async/TaskGraphInterfaces.h |
Enums
Public
| Name | Remarks |
|---|---|
| EProcessTasksOperation | Used to define what ProcessUntilTasksComplete should do next |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FProcessTasksUpdateCallback | TFunction< EProcessTasksOperation(int32)> | Function periodically called during task processing, with parameter set to number of tasks remaining | Async/TaskGraphInterfaces.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddShutdownCallback
(
TFunction< void()>& Callback |
Delegates for shutdown | Async/TaskGraphInterfaces.h | |
void AttachToThread
(
ENamedThreads::Type CurrentThread |
A one time call that "introduces" an external thread to the system. | Async/TaskGraphInterfaces.h | |
FBaseGraphTask * FindWork
(
ENamedThreads::Type ThreadInNeed |
Async/TaskGraphInterfaces.h | ||
ENamedThreads::Type GetCurrentThreadIfKnown
(
bool bLocalQueue |
Return the current thread type, if known. | Async/TaskGraphInterfaces.h | |
int32 GetNumBackgroundThreads () |
Return the number of background worker threads. | Async/TaskGraphInterfaces.h | |
int32 GetNumForegroundThreads () |
Return the number of foreground worker threads. | Async/TaskGraphInterfaces.h | |
int32 GetNumWorkerThreads () |
Return the number of worker (non-named) threads PER PRIORITY SET. | Async/TaskGraphInterfaces.h | |
bool IsCurrentThreadKnown() |
Return true if the current thread is known. | Async/TaskGraphInterfaces.h | |
bool IsThreadProcessingTasks
(
ENamedThreads::Type ThreadToCheck |
Return true if the given named thread is processing tasks. | Async/TaskGraphInterfaces.h | |
uint64 ProcessThreadUntilIdle
(
ENamedThreads::Type CurrentThread |
Requests that a named thread, which must be this thread, run until idle, then return. | Async/TaskGraphInterfaces.h | |
void ProcessThreadUntilRequestReturn
(
ENamedThreads::Type CurrentThread |
Requests that a named thread, which must be this thread, run until an explicit return request is received, then return. | Async/TaskGraphInterfaces.h | |
bool ProcessUntilTasksComplete
(
const FGraphEventArray& Tasks, |
Requests that a named thread actively attempt to process a list of tasks and periodically call an update function when idle. | Async/TaskGraphInterfaces.h | |
void RequestReturn
(
ENamedThreads::Type CurrentThread |
Request that the given thread stop when it is idle | Async/TaskGraphInterfaces.h | |
void StallForTuning
(
int32 Index, |
Async/TaskGraphInterfaces.h | ||
void TriggerEventWhenTaskCompletes
(
FEvent* InEvent, |
When a task completes, fire a scoped event | Async/TaskGraphInterfaces.h | |
void TriggerEventWhenTasksComplete
(
FEvent* InEvent, |
When a set of tasks complete, fire a scoped event | Async/TaskGraphInterfaces.h | |
void WaitUntilTaskCompletes
(
const FGraphEventRef& Task, |
Requests that a named thread, which must be this thread, run until a task is complete | Async/TaskGraphInterfaces.h | |
void WaitUntilTaskCompletes
(
FGraphEventRef&& Task, |
Async/TaskGraphInterfaces.h | ||
void WaitUntilTasksComplete
(
const FGraphEventArray& Tasks, |
Requests that a named thread, which must be this thread, run until a list of tasks is complete. | Async/TaskGraphInterfaces.h | |
void WakeNamedThread
(
ENamedThreads::Type ThreadToWake |
Async/TaskGraphInterfaces.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void BroadcastSlow_OnlyUseForSpecialPurposes
(
bool bDoTaskThreads, |
A (slow) function to call a function on every known thread, both named and workers | Async/TaskGraphInterfaces.h | |
static FTaskGraphInterface & Get() |
Singleton for the system | Async/TaskGraphInterfaces.h | |
static bool IsMultithread () |
The task graph is always multi-threaded for platforms that support it. | Async/TaskGraphInterfaces.h | |
static bool IsRunning() |
Check to see if the system is running. | Async/TaskGraphInterfaces.h | |
static void Shutdown() |
Explicit start call to shutdown the system. This is unlikely to work unless the system is idle. | Async/TaskGraphInterfaces.h | |
static void Startup
(
int32 NumThreads |
Explicit start call for the system. | Async/TaskGraphInterfaces.h |