Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FSingleThreadEvent Class Reference

#include <SingleThreadEvent.h>

+ Inheritance diagram for FSingleThreadEvent:
+ Collaboration diagram for FSingleThreadEvent:

Public Member Functions

 FSingleThreadEvent ()
 
virtual bool Create (bool bIsManualReset=false) override
 
virtual bool IsManualReset () override
 
virtual void Trigger () override
 
virtual void Reset () override
 
virtual bool Wait (uint32 WaitTime, const bool bIgnoreThreadIdleStats=false) override
 
- Public Member Functions inherited from FEvent
bool Wait ()
 
bool Wait (const FTimespan &WaitTime, const bool bIgnoreThreadIdleStats=false)
 
 FEvent ()
 
virtual ~FEvent ()
 
void AdvanceStats ()
 

Private Attributes

bool bTriggered
 
bool bManualReset
 

Additional Inherited Members

- Protected Member Functions inherited from FEvent
void WaitForStats ()
 
void TriggerForStats ()
 
void ResetForStats ()
 
- Protected Attributes inherited from FEvent
uint32 EventId
 
TAtomic< uint32EventStartCycles
 
- Static Protected Attributes inherited from FEvent
static TAtomic< uint32EventUniqueId
 

Detailed Description

Fake event object used when running with only one thread.

Definition at line 12 of file SingleThreadEvent.h.

Constructor & Destructor Documentation

◆ FSingleThreadEvent()

FSingleThreadEvent::FSingleThreadEvent ( )
inline

Default constructor.

Definition at line 24 of file SingleThreadEvent.h.

Member Function Documentation

◆ Create()

virtual bool FSingleThreadEvent::Create ( bool bIsManualReset = false)
inlineoverridevirtual

Creates the event.

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

Parameters
bIsManualResetWhether the event requires manual reseting or not.
Returns
true if the event was created, false otherwise.

Implements FEvent.

Definition at line 33 of file SingleThreadEvent.h.

◆ IsManualReset()

virtual bool FSingleThreadEvent::IsManualReset ( )
inlineoverridevirtual

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

Returns
true if the state requires manual resetting, false otherwise.
See also
Reset

Implements FEvent.

Definition at line 39 of file SingleThreadEvent.h.

◆ Reset()

virtual void FSingleThreadEvent::Reset ( )
inlineoverridevirtual

Resets the event to an untriggered (waitable) state.

See also
IsManualReset, Trigger

Implements FEvent.

Definition at line 49 of file SingleThreadEvent.h.

◆ Trigger()

virtual void FSingleThreadEvent::Trigger ( )
inlineoverridevirtual

Triggers the event so any waiting threads are activated.

See also
IsManualReset, Reset

Implements FEvent.

Definition at line 44 of file SingleThreadEvent.h.

◆ Wait()

virtual bool FSingleThreadEvent::Wait ( uint32 WaitTime,
const bool bIgnoreThreadIdleStats = false )
inlineoverridevirtual

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

A wait time of MAX_uint32 is treated as infinite wait.

Parameters
WaitTimeThe time to wait (in milliseconds).
bIgnoreThreadIdleStatsIf true, ignores ThreadIdleStats
Returns
true if the event was triggered, false if the wait timed out.

Implements FEvent.

Definition at line 54 of file SingleThreadEvent.h.

Member Data Documentation

◆ bManualReset

bool FSingleThreadEvent::bManualReset
private

Should this event reset automatically or not.

Definition at line 19 of file SingleThreadEvent.h.

◆ bTriggered

bool FSingleThreadEvent::bTriggered
private

Flag to know whether this event has been triggered.

Definition at line 16 of file SingleThreadEvent.h.


The documentation for this class was generated from the following file: