engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | Protected 属性 | 静态 Protected 属性 | 所有成员列表
FEvent类 参考abstract

Interface for waitable events. 更多...

#include <Event.h>

+ 类 FEvent 继承关系图:

Public 成员函数

void AdvanceStats ()
 Advances stats associated with this event. 更多...
 
virtual bool Create (bool bIsManualReset=false)=0
 Creates the event. 更多...
 
 FEvent ()
 Default constructor.
 
virtual bool IsManualReset ()=0
 Whether the signaled state of this event needs to be reset manually. 更多...
 
virtual void Reset ()=0
 Resets the event to an untriggered (waitable) state. 更多...
 
virtual void Trigger ()=0
 Triggers the event so any waiting threads are activated. 更多...
 
bool Wait ()
 Waits an infinite amount of time for the event to be triggered. 更多...
 
bool Wait (const FTimespan &WaitTime, const bool bIgnoreThreadIdleStats=false)
 Waits the specified amount of time for the event to be triggered. 更多...
 
virtual bool Wait (uint32 WaitTime, const bool bIgnoreThreadIdleStats=false)=0
 Waits the specified amount of time for the event to be triggered. 更多...
 
virtual ~FEvent ()
 Virtual destructor.
 

Protected 成员函数

void ResetForStats ()
 Resets start cycles to 0.
 
void TriggerForStats ()
 Send to the stats a special message which encodes a trigger for the event.
 
void WaitForStats ()
 Sends to the stats a special messages which encodes a wait for the event.
 

Protected 属性

uint32 EventId
 An unique id of this event.
 
TAtomic< uint32 > EventStartCycles
 Greater than 0, if the event called wait.
 

静态 Protected 属性

static TAtomic< uint32 > EventUniqueId
 Counter used to generate an unique id for the events.
 

详细描述

Interface for waitable events.

This interface has platform-specific implementations that are used to wait for another thread to signal that it is ready for the waiting thread to do some work. It can also be used for telling groups of threads to exit.

Consider using FEventRef as a safer and more convenient alternative.

成员函数说明

◆ AdvanceStats()

void FEvent::AdvanceStats ( )

Advances stats associated with this event.

Used to monitor wait->trigger history.

◆ Create()

virtual bool FEvent::Create ( bool  bIsManualReset = false)
pure virtual

Creates the event.

Manually reset events stay triggered until reset. Named events share the same underlying event.

参数
bIsManualResetWhether the event requires manual reseting or not.
返回
true if the event was created, false otherwise.

在 FPThreadEvent , 以及 FSingleThreadEvent 内被实现.

◆ IsManualReset()

virtual bool FEvent::IsManualReset ( )
pure virtual

Whether the signaled state of this event needs to be reset manually.

返回
true if the state requires manual resetting, false otherwise.
参见
Reset

在 FPThreadEvent , 以及 FSingleThreadEvent 内被实现.

◆ Reset()

virtual void FEvent::Reset ( )
pure virtual

Resets the event to an untriggered (waitable) state.

参见
IsManualReset, Trigger

在 FPThreadEvent , 以及 FSingleThreadEvent 内被实现.

◆ Trigger()

virtual void FEvent::Trigger ( )
pure virtual

Triggers the event so any waiting threads are activated.

参见
IsManualReset, Reset

在 FPThreadEvent , 以及 FSingleThreadEvent 内被实现.

◆ Wait() [1/3]

bool FEvent::Wait ( )
inline

Waits an infinite amount of time for the event to be triggered.

返回
true if the event was triggered.

◆ Wait() [2/3]

bool FEvent::Wait ( const FTimespan &  WaitTime,
const bool  bIgnoreThreadIdleStats = false 
)
inline

Waits the specified amount of time for the event to be triggered.

参数
WaitTimeThe time to wait.
bIgnoreThreadIdleStatsIf true, ignores ThreadIdleStats
返回
true if the event was triggered, false if the wait timed out.

◆ Wait() [3/3]

virtual bool FEvent::Wait ( uint32  WaitTime,
const bool  bIgnoreThreadIdleStats = false 
)
pure virtual

Waits the specified amount of time for the event to be triggered.

A wait time of MAX_uint32 is treated as infinite wait.

参数
WaitTimeThe time to wait (in milliseconds).
bIgnoreThreadIdleStatsIf true, ignores ThreadIdleStats
返回
true if the event was triggered, false if the wait timed out.

在 FSingleThreadEvent , 以及 FPThreadEvent 内被实现.


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