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

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.

成员函数说明

◆ AddRef()

uint32 FGraphEvent::AddRef ( )
inline

Increases the reference count

返回
the new reference count

◆ AddSubsequent()

bool FGraphEvent::AddSubsequent ( class FBaseGraphTask *  Task)
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).

返回
true if the task was successfully set up as a subsequent. false if the event has already fired.

◆ CreateGraphEvent()

static CORE_API FGraphEventRef FGraphEvent::CreateGraphEvent ( )
static

A factory method to create a graph event.

返回
a reference counted pointer to the new graph event. Note this should be stored in a FGraphEventRef or it will be immediately destroyed!

◆ DispatchSubsequents() [1/2]

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.

参数
CurrentThreadIfKnownif the current thread is known, provide it here. Otherwise it will be determined via TLS if any task ends up being queued.

◆ DispatchSubsequents() [2/2]

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.

参数
NewTaskssubsequents to add
CurrentThreadIfKnownif the current thread is known, provide it here. Otherwise it will be determined via TLS if any task ends up being queued.

◆ DontCompleteUntil()

void FGraphEvent::DontCompleteUntil ( FGraphEventRef  EventToWaitFor)
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.

参数
EventToWaitForevent to wait for until we fire.

◆ IsComplete()

bool FGraphEvent::IsComplete ( ) const
inline

Determine if the event has been completed.

This can be used to poll for completion.

返回
true if this event has completed. CAUTION: If this returns false, the event could still end up completing before this function even returns. In other words, a false return does not mean that event is not yet completed!

◆ Release()

uint32 FGraphEvent::Release ( )
inline

Decreases the reference count and destroys the graph event if it is zero.

返回
the new reference count

◆ SetGatherThreadForDontCompleteUntil()

void FGraphEvent::SetGatherThreadForDontCompleteUntil ( ENamedThreads::Type  InThreadToDoGatherOn)
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.

参数
ThreadToDoGatherOnthread and priority to execute null gather task on

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