FTaskTagScope

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.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

FTaskTagScope

FOptionalTaskTagScope

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/CoreGlobals.h

Include

#include "CoreGlobals.h"

Syntax

class FTaskTagScope

Remarks

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.

Constructors

Name Description

Public function

FTaskTagScope

(
    ETaskTag InTag
)

Protected function

FTaskTagScope

(
    bool InTagOnlyIfNone,
    ETaskTag InTag
)

Destructors

Name Description

Public function

~FTaskTagScope()

Functions

Name Description

Public function Static

ETaskTag

 

GetCurrentTag()

Public function Static

bool

 

IsCurrentTag

(
    ETaskTag InTag
)

Public function Static

bool

 

IsRunningDuringStaticInit()

Public function Static

void

 

SetTagNone()

Clear the ETaskTag::StaticInit tag so that the Main OS Thread has no active tag.

Public function Static

void

 

SetTagStaticInit()

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()).

Constants

Name

Description

ActiveTaskTag