FThreadSafeBool

DEPRECATED. Please use `std::atomic_

Choose your operating system:

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