engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 友元 | 所有成员列表
FTaskGraphInterface类 参考abstract

Interface tot he task graph system 更多...

#include <TaskGraphInterfaces.h>

Public 成员函数

virtual void AddShutdownCallback (TFunction< void()> &Callback)=0
 Delegates for shutdown 更多...
 
virtual void AttachToThread (ENamedThreads::Type CurrentThread)=0
 A one time call that "introduces" an external thread to the system. 更多...
 
virtual ENamedThreads::Type GetCurrentThreadIfKnown (bool bLocalQueue=false)=0
 Return the current thread type, if known.
 
virtual int32 GetNumWorkerThreads ()=0
 Return the number of worker (non-named) threads PER PRIORITY SET. 更多...
 
virtual bool IsThreadProcessingTasks (ENamedThreads::Type ThreadToCheck)=0
 Return true if the given named thread is processing tasks. 更多...
 
virtual uint64 ProcessThreadUntilIdle (ENamedThreads::Type CurrentThread)=0
 Requests that a named thread, which must be this thread, run until idle, then return. 更多...
 
virtual void ProcessThreadUntilRequestReturn (ENamedThreads::Type CurrentThread)=0
 Requests that a named thread, which must be this thread, run until an explicit return request is received, then return. 更多...
 
virtual void RequestReturn (ENamedThreads::Type CurrentThread)=0
 Request that the given thread stop when it is idle
 
void TriggerEventWhenTaskCompletes (FEvent *InEvent, const FGraphEventRef &Task, ENamedThreads::Type CurrentThreadIfKnown=ENamedThreads::AnyThread, ENamedThreads::Type TriggerThread=ENamedThreads::AnyHiPriThreadHiPriTask)
 When a task completes, fire a scoped event 更多...
 
virtual void TriggerEventWhenTasksComplete (FEvent *InEvent, const FGraphEventArray &Tasks, ENamedThreads::Type CurrentThreadIfKnown=ENamedThreads::AnyThread, ENamedThreads::Type TriggerThread=ENamedThreads::AnyHiPriThreadHiPriTask)=0
 When a set of tasks complete, fire a scoped event 更多...
 
void WaitUntilTaskCompletes (const FGraphEventRef &Task, ENamedThreads::Type CurrentThreadIfKnown=ENamedThreads::AnyThread)
 Requests that a named thread, which must be this thread, run until a task is complete 更多...
 
virtual void WaitUntilTasksComplete (const FGraphEventArray &Tasks, ENamedThreads::Type CurrentThreadIfKnown=ENamedThreads::AnyThread)=0
 Requests that a named thread, which must be this thread, run until a list of tasks is complete. 更多...
 

静态 Public 成员函数

static void BroadcastSlow_OnlyUseForSpecialPurposes (bool bDoTaskThreads, bool bDoBackgroundThreads, TFunction< void(ENamedThreads::Type CurrentThread)> &Callback)
 A (slow) function to call a function on every known thread, both named and workers 更多...
 
static CORE_API FTaskGraphInterface & Get ()
 Singleton for the system 更多...
 
static bool IsMultithread ()
 The task graph is always multi-threaded for platforms that support it. 更多...
 
static CORE_API bool IsRunning ()
 Check to see if the system is running.
 
static CORE_API void Shutdown ()
 Explicit start call to shutdown the system. 更多...
 
static CORE_API void Startup (int32 NumThreads)
 Explicit start call for the system. 更多...
 

友元

class FBaseGraphTask
 

详细描述

Interface tot he task graph system

成员函数说明

◆ AddShutdownCallback()

virtual void FTaskGraphInterface::AddShutdownCallback ( TFunction< void()> &  Callback)
pure virtual

Delegates for shutdown

参数
Callback- function to call prior to shutting down the taskgraph

◆ AttachToThread()

virtual void FTaskGraphInterface::AttachToThread ( ENamedThreads::Type  CurrentThread)
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.

◆ BroadcastSlow_OnlyUseForSpecialPurposes()

static void FTaskGraphInterface::BroadcastSlow_OnlyUseForSpecialPurposes ( bool  bDoTaskThreads,
bool  bDoBackgroundThreads,
TFunction< void(ENamedThreads::Type CurrentThread)> &  Callback 
)
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

◆ Get()

static CORE_API FTaskGraphInterface & FTaskGraphInterface::Get ( )
static

Singleton for the system

返回
a reference to the task graph system

◆ GetNumWorkerThreads()

virtual int32 FTaskGraphInterface::GetNumWorkerThreads ( )
pure virtual

Return the number of worker (non-named) threads PER PRIORITY SET.

This is useful for determining how many tasks to split a job into.

◆ IsMultithread()

static bool FTaskGraphInterface::IsMultithread ( )
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

◆ IsThreadProcessingTasks()

virtual bool FTaskGraphInterface::IsThreadProcessingTasks ( ENamedThreads::Type  ThreadToCheck)
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.

◆ ProcessThreadUntilIdle()

virtual uint64 FTaskGraphInterface::ProcessThreadUntilIdle ( ENamedThreads::Type  CurrentThread)
pure virtual

Requests that a named thread, which must be this thread, run until idle, then return.

参数
CurrentThread;The name of this thread

◆ ProcessThreadUntilRequestReturn()

virtual void FTaskGraphInterface::ProcessThreadUntilRequestReturn ( ENamedThreads::Type  CurrentThread)
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

◆ Shutdown()

static CORE_API void FTaskGraphInterface::Shutdown ( )
static

Explicit start call to shutdown the system.

This is unlikely to work unless the system is idle.

◆ Startup()

static CORE_API void FTaskGraphInterface::Startup ( int32  NumThreads)
static

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

◆ TriggerEventWhenTaskCompletes()

void FTaskGraphInterface::TriggerEventWhenTaskCompletes ( FEvent *  InEvent,
const FGraphEventRef &  Task,
ENamedThreads::Type  CurrentThreadIfKnown = ENamedThreads::AnyThread,
ENamedThreads::Type  TriggerThread = ENamedThreads::AnyHiPriThreadHiPriTask 
)
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

◆ TriggerEventWhenTasksComplete()

virtual void FTaskGraphInterface::TriggerEventWhenTasksComplete ( FEvent *  InEvent,
const FGraphEventArray &  Tasks,
ENamedThreads::Type  CurrentThreadIfKnown = ENamedThreads::AnyThread,
ENamedThreads::Type  TriggerThread = ENamedThreads::AnyHiPriThreadHiPriTask 
)
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

◆ WaitUntilTaskCompletes()

void FTaskGraphInterface::WaitUntilTaskCompletes ( const FGraphEventRef &  Task,
ENamedThreads::Type  CurrentThreadIfKnown = ENamedThreads::AnyThread 
)
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

◆ WaitUntilTasksComplete()

virtual void FTaskGraphInterface::WaitUntilTasksComplete ( const FGraphEventArray &  Tasks,
ENamedThreads::Type  CurrentThreadIfKnown = ENamedThreads::AnyThread 
)
pure virtual

Requests that a named thread, which must be this thread, run until a list of tasks is complete.

参数
Tasks- tasks to wait for
CurrentThread- This thread, must be a named thread

该类的文档由以下文件生成: