Download

Need advice on using Atomic types in Unreal. TAtomic or std::atomic?

Hey guys, title pretty much says it all. I’m struggling with how I should properly use atomics in unreal. TAtomic’s documentation notes that it’s essentially deprecated, so I’m wondering if I should use UE’s systems for accessing data atomically, or just the regular old C++11 stuff?

In my use case I need maximum portability, so using UE’s systems is appealing since they wrap to w/e code for the relevant platform. Problem is that a lot of things are outdated, so I’m confused.

Any help would be greatly appreciated! Cheers!

Noting that in the UE5 docs, it explicitly states to use std::atomic .