TAtomicBase_Basic

`[TAtomic](API\Runtime\Core\Templates\TAtomic)_ is planned for deprecation. Please use `std::atomic_

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Templates/Atomic.h

Include

#include "Templates/Atomic.h"

Syntax

template<typename T>
struct TAtomicBase_Basic

Remarks

Basic storage and implementation - only allows getting and setting via platform atomics.

Variables

Name Description

Protected variable

T

 

Element

Constructors

Name Description

Protected function

TAtomicBase_Basic()

Protected function

TAtomicBase_Basic

(
    T Value
)

Functions

Name Description

Public function

bool

 

CompareExchange

(
    T& Expected,
    T Value
)

Compares the element with an expected value and, only if comparison succeeds, assigns the element to a new value.

Public function

T

 

Exchange

(
    T Value
)

Sets the element to a specific value, returning a copy of the previous value.

Public function Const

T

 

Load

(
    EMemoryOrder Order
)

Gets a copy of the current value of the element.

Public function

void

 

Store

(
    T Value,
    EMemoryOrder Order
)

Sets the element to a specific value.

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