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
|
pure virtual |
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 |
|
static |
Singleton for the system
|
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.
|
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
|
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 |
|
static |
Explicit start call to shutdown the system.
This is unlikely to work unless the system is idle.
|
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 |
|
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 |
|
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 |