FThreadSafeBool

Thread safe bool, wraps [FThreadSafeCounter](API\Runtime\Core\HAL\FThreadSafeCounter)

Windows
MacOS
Linux

Inheritance Hierarchy

FThreadSafeCounter

FThreadSafeBool

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/HAL/ThreadSafeBool.h

Include

#include "HAL/ThreadSafeBool.h"

Syntax

class FThreadSafeBool : private FThreadSafeCounter

Remarks

Thread safe bool, wraps FThreadSafeCounter

Constructors

Name Description

Public function

FThreadSafeBool

(
    bool bValue
)

Constructor optionally takes value to initialize with, otherwise initializes false

Functions

Name Description

Public function

bool

 

AtomicSet

(
    bool bNewValue
)

Sets a new value atomically, and returns the old value.

Operators

Name Description

Public function Const

 

operator bool()

Operator to use this struct as a bool with thread safety

Public function

bool

 

operator=

(
    bool bNewValue
)

Operator to set the bool value with thread safety

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss