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

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback