UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FThreadSafeBool Class Reference

#include <ThreadSafeBool.h>

+ Inheritance diagram for FThreadSafeBool:

Public Member Functions

 FThreadSafeBool (bool bValue=false)
 
UE_FORCEINLINE_HINT operator bool () const
 
bool operator= (bool bNewValue)
 
UE_FORCEINLINE_HINT bool AtomicSet (bool bNewValue)
 

Detailed Description

Thread safe bool, wraps FThreadSafeCounter

Constructor & Destructor Documentation

◆ FThreadSafeBool()

FThreadSafeBool::FThreadSafeBool ( bool  bValue = false)
inline

Constructor optionally takes value to initialize with, otherwise initializes false

Parameters
bValueValue to initialize with

Member Function Documentation

◆ AtomicSet()

UE_FORCEINLINE_HINT bool FThreadSafeBool::AtomicSet ( bool  bNewValue)
inline

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

Parameters
bNewValueValue to set
Returns
The old value

◆ operator bool()

UE_FORCEINLINE_HINT FThreadSafeBool::operator bool ( ) const
inline

Operator to use this struct as a bool with thread safety

◆ operator=()

bool FThreadSafeBool::operator= ( bool  bNewValue)
inline

Operator to set the bool value with thread safety


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