Navigation
API > API/Runtime > API/Runtime/Core
DEPRECATED! UE atomics are not maintained and potentially will be physically deprecated. Use std::atomic
Atomic object wrapper class which wraps an element of T. This allows the following benefits:
- Changes made to the element on one thread can never be observed as a partial state by other threads. (atomicity)
- Memory accesses within a thread are not reordered across any access of the element. (acquire/release semantics)
- There is a single, visible, global order of atomic accesses throughout the system. (sequential consistency)
| Name | TAtomic |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/Atomic.h |
| Include Path | #include "Templates/Atomic.h" |
Syntax
template<typename T>
class TAtomic : public UE::Core::Private::Atomic::TAtomicBaseType_T< T >
Inheritance Hierarchy
- TAtomic
- UE::Core::Private::Atomic::TAtomicBaseType_T< T > → TAtomic
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TAtomic () |
Default initializes the element type. | Templates/Atomic.h | |
constexpr TAtomic
(
T Arg |
Initializes the element type with the given argument types.This constructor is not atomic. | Templates/Atomic.h | |
| Non-copyable and non-movable. | Templates/Atomic.h | ||
| Templates/Atomic.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ElementType | T | Templates/Atomic.h |
Functions
Public
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator T() |
Gets a copy of the current value of the element. | Templates/Atomic.h | |
T operator=
(
T Value |
Sets the element to a specific value, returning a copy of the value. | Templates/Atomic.h | |
| Templates/Atomic.h | |||
| Templates/Atomic.h |