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

#include <CoreGlobals.h>

+ Inheritance diagram for FTaskTagScope:

Public Member Functions

 FTaskTagScope (ETaskTag InTag=ETaskTag::ENone)
 
 ~FTaskTagScope ()
 

Static Public Member Functions

static void SetTagNone ()
 
static void SetTagStaticInit ()
 
static ETaskTag SwapTag (ETaskTag Tag)
 
static ETaskTag GetCurrentTag ()
 
static bool IsCurrentTag (ETaskTag InTag)
 
static bool IsRunningDuringStaticInit ()
 

Protected Member Functions

 FTaskTagScope (bool InTagOnlyIfNone, ETaskTag InTag)
 

Static Private Member Functions

static int32 GetStaticThreadId ()
 

Private Attributes

ETaskTag ParentTag
 
ETaskTag Tag
 
bool TagOnlyIfNone
 

Static Private Attributes

static thread_local ETaskTag ActiveTaskTag
 

Friends

class FRunnableThread
 
class FRenderingThread
 

Detailed Description

This class can be used to Tag an execution context aka Thead or Job and allows us to later querry the state when we are in the callstack It is usually used for the IsInRendering/GamethreadFunctions.

Parameters
CtorSignatureInTag the Tag to use

Definition at line 605 of file CoreGlobals.h.

Constructor & Destructor Documentation

◆ FTaskTagScope() [1/2]

FTaskTagScope::FTaskTagScope ( bool InTagOnlyIfNone,
ETaskTag InTag )
protected
+ Here is the caller graph for this function:

◆ FTaskTagScope() [2/2]

FTaskTagScope::FTaskTagScope ( ETaskTag InTag = ETaskTag::ENone)
inline

Definition at line 638 of file CoreGlobals.h.

+ Here is the call graph for this function:

◆ ~FTaskTagScope()

FTaskTagScope::~FTaskTagScope ( )

Member Function Documentation

◆ GetCurrentTag()

static ETaskTag FTaskTagScope::GetCurrentTag ( )
static

◆ GetStaticThreadId()

static int32 FTaskTagScope::GetStaticThreadId ( )
staticprivate

◆ IsCurrentTag()

static bool FTaskTagScope::IsCurrentTag ( ETaskTag InTag)
static

◆ IsRunningDuringStaticInit()

static bool FTaskTagScope::IsRunningDuringStaticInit ( )
static

◆ SetTagNone()

static void FTaskTagScope::SetTagNone ( )
static

Clear the ETaskTag::StaticInit tag so that the Main OS Thread has no active tag. This will allow functions such as IsInGameThread() to function properly when called from the Main Thread.

◆ SetTagStaticInit()

static void FTaskTagScope::SetTagStaticInit ( )
static

Restore the ETaskTag::StaticInit tag so that the destructors of global (or local static) C++ objects function properly when checking thread state (from functions like IsInGameThread()).

◆ SwapTag()

static ETaskTag FTaskTagScope::SwapTag ( ETaskTag Tag)
static

Swap the Tag this is only used when Thread contexts move between different threads.

Friends And Related Symbol Documentation

◆ FRenderingThread

friend class FRenderingThread
friend

Definition at line 608 of file CoreGlobals.h.

◆ FRunnableThread

Definition at line 607 of file CoreGlobals.h.

Member Data Documentation

◆ ActiveTaskTag

thread_local ETaskTag FTaskTagScope::ActiveTaskTag
staticprivate

Definition at line 609 of file CoreGlobals.h.

◆ ParentTag

ETaskTag FTaskTagScope::ParentTag
private

Definition at line 611 of file CoreGlobals.h.

◆ Tag

ETaskTag FTaskTagScope::Tag
private

Definition at line 612 of file CoreGlobals.h.

◆ TagOnlyIfNone

bool FTaskTagScope::TagOnlyIfNone
private

Definition at line 613 of file CoreGlobals.h.


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