![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <TaskGraphInterfaces.h>
Inheritance diagram for FTaskGraphInterface:Public Types | |
| enum class | EProcessTasksOperation : int8 { ProcessAllOtherTasks , ProcessOneOtherTask , ProcessNamedThreadTasks , WaitUntilComplete , StopProcessing } |
| typedef TFunction< EProcessTasksOperation(int32)> | FProcessTasksUpdateCallback |
Static Public Member Functions | |
| static CORE_API void | Startup (int32 NumThreads) |
| static CORE_API void | Shutdown () |
| static CORE_API bool | IsRunning () |
| static CORE_API FTaskGraphInterface & | Get () |
| static bool | IsMultithread () |
| static void | BroadcastSlow_OnlyUseForSpecialPurposes (bool bDoTaskThreads, bool bDoBackgroundThreads, TFunction< void(ENamedThreads::Type CurrentThread)> &Callback) |
Friends | |
| class | FBaseGraphTask |
Interface to the task graph system
Function periodically called during task processing, with parameter set to number of tasks remaining
|
strong |
Used to define what ProcessUntilTasksComplete should do next
|
inlinevirtual |
Delegates for shutdown
| Callback | - function to call prior to shutting down the taskgraph |
|
pure virtual |
A one time call that "introduces" an external thread to the system. Basically, it just sets up the TLS info
| CurrentThread; | The name of the current thread. |
|
static |
A (slow) function to call a function on every known thread, both named and workers
| Callback | - function to call prior to shutting down the taskgraph |
|
pure virtual |
|
static |
Singleton for the system
|
pure virtual |
Return the current thread type, if known.
Return the number of background worker threads. If the old backend is used, return the number of background workers (0 if background workers are disabled).
Return the number of foreground worker threads. If the old backend is used, return the number of high-pri workers (0 if high-pri workers are disabled).
Return the number of worker (non-named) threads PER PRIORITY SET. This is useful for determining how many tasks to split a job into.
Return true if the current thread is known.
|
static |
The task graph is always multi-threaded for platforms that support it. For forked processes, the taskgraph will be singlethread for the master process but becomes multithread in the forked process
|
static |
Check to see if the system is running.
|
pure virtual |
Return true if the given named thread is processing tasks. This is only a "guess" if you ask for a thread other than yourself because that can change before the function returns.
|
pure virtual |
Requests that a named thread, which must be this thread, run until idle, then return.
| CurrentThread; | The name of this thread |
|
pure virtual |
Requests that a named thread, which must be this thread, run until an explicit return request is received, then return.
| CurrentThread; | The name of this thread |
|
pure virtual |
Requests that a named thread actively attempt to process a list of tasks and periodically call an update function when idle. This function assumes that many of the tasks can be completed on this thread.
| Tasks | - tasks to wait for |
| CurrentThread | - This thread, must be a named thread |
| IdleWorkUpdate | - If set, call this function after trying to process named thread work if any tasks are stalled |
|
pure virtual |
Request that the given thread stop when it is idle
|
static |
Explicit start call to shutdown the system. This is unlikely to work unless the system is idle.
Explicit start call for the system. The ordinary singleton pattern does not work because internal threads start asking for the singleton before the constructor has returned.
| NumThreads; | Total number of threads in the system, must be 0 to disable separate taskgraph thread, at least 2 if !threadedrendering, else at least 3 |
|
inline |
When a task completes, fire a scoped event
| InEvent | - event to fire when the task is done |
| Task | - task to wait for |
| CurrentThreadIfKnown | - This thread, if known |
|
pure virtual |
When a set of tasks complete, fire a scoped event
| InEvent | - event to fire when the task is done |
| Tasks | - tasks to wait for |
| CurrentThreadIfKnown | - This thread, if known |
|
inline |
Requests that a named thread, which must be this thread, run until a task is complete
| Task | - task to wait for |
| CurrentThread | - This thread, must be a named thread |
|
inline |
|
pure virtual |
Requests that a named thread, which must be this thread, run until a list of tasks is complete. This function assumes that most of the tasks will be processed on a different thread, but will process if needed.
| Tasks | - tasks to wait for |
| CurrentThread | - This thread, must be a named thread |
|
pure virtual |
|
friend |