A FGraphEvent is a list of tasks waiting for something. 更多...
#include <TaskGraphInterfaces.h>
Public 成员函数 | |
| uint32 | AddRef () |
| Increases the reference count 更多... | |
| bool | AddSubsequent (class FBaseGraphTask *Task) |
| Attempts to a new subsequent task. 更多... | |
| void | CheckDontCompleteUntilIsEmpty () |
| Verification function to ensure that nobody was tried to add WaitUntil's outside of the context of execution | |
| CORE_API void | DispatchSubsequents (ENamedThreads::Type CurrentThreadIfKnown=ENamedThreads::AnyThread) |
| "Complete" the event. 更多... | |
| CORE_API void | DispatchSubsequents (TArray< FBaseGraphTask * > &NewTasks, ENamedThreads::Type CurrentThreadIfKnown=ENamedThreads::AnyThread) |
| "Complete" the event. 更多... | |
| void | DontCompleteUntil (FGraphEventRef EventToWaitFor) |
| Delay the firing of this event until the given event fires. 更多... | |
| bool | IsComplete () const |
| Determine if the event has been completed. 更多... | |
| uint32 | Release () |
| Decreases the reference count and destroys the graph event if it is zero. 更多... | |
| void | SetDebugName (const TCHAR *Name) |
| Sets a name for the event for debugging purposes. | |
| void | SetGatherThreadForDontCompleteUntil (ENamedThreads::Type InThreadToDoGatherOn) |
| Sets the thread that you want to execute the null gather task on. 更多... | |
| void | Wait (ENamedThreads::Type CurrentThreadIfKnown=ENamedThreads::AnyThread) |
A convenient short version of FTaskGraphInterface::WaitUntilTaskCompletes | |
静态 Public 成员函数 | |
| static CORE_API FGraphEventRef | CreateGraphEvent () |
| A factory method to create a graph event. 更多... | |
友元 | |
| struct | FGraphEventAndSmallTaskStorage |
| Hidden Constructor | |
| class | TLockFreeClassAllocator_TLSCache< FGraphEvent, PLATFORM_CACHE_LINE_SIZE > |
| class | TRefCountPtr< FGraphEvent > |
A FGraphEvent is a list of tasks waiting for something.
These tasks are call the subsequents. A graph event is a prerequisite for each of its subsequents. Graph events have a lifetime managed by reference counting.
|
inline |
Increases the reference count
|
inline |
Attempts to a new subsequent task.
If this event has already fired, false is returned and action must be taken to ensure that the task will still fire even though this event cannot be a prerequisite (because it is already finished).
|
static |
A factory method to create a graph event.
| CORE_API void FGraphEvent::DispatchSubsequents | ( | ENamedThreads::Type | CurrentThreadIfKnown = ENamedThreads::AnyThread | ) |
"Complete" the event.
This grabs the list of subsequents and atomically closes it. Then for each subsequent it reduces the number of prerequisites outstanding and if that drops to zero, the task is queued.
| CurrentThreadIfKnown | if the current thread is known, provide it here. Otherwise it will be determined via TLS if any task ends up being queued. |
| CORE_API void FGraphEvent::DispatchSubsequents | ( | TArray< FBaseGraphTask * > & | NewTasks, |
| ENamedThreads::Type | CurrentThreadIfKnown = ENamedThreads::AnyThread |
||
| ) |
"Complete" the event.
This grabs the list of subsequents and atomically closes it. Then for each subsequent and for each item in "NewTasks" it reduces the number of prerequisites outstanding and if that drops to zero, the task is queued.
| NewTasks | subsequents to add |
| CurrentThreadIfKnown | if the current thread is known, provide it here. Otherwise it will be determined via TLS if any task ends up being queued. |
|
inline |
Delay the firing of this event until the given event fires.
CAUTION: This is only legal while executing the task associated with this event.
| EventToWaitFor | event to wait for until we fire. |
|
inline |
Determine if the event has been completed.
This can be used to poll for completion.
|
inline |
Decreases the reference count and destroys the graph event if it is zero.
|
inline |
Sets the thread that you want to execute the null gather task on.
This is useful if the thing waiting for this chain to complete is a single, named thread. CAUTION: This is only legal while executing the task associated with this event.
| ThreadToDoGatherOn | thread and priority to execute null gather task on |