Advanced atomic operations in C++

Exploring std::memory_order and some other atomic-related things

CMP

--

Introduction

In the previous article, I discussed the basics of C++ atomic operations for concurrency using std::atomic from the <atomic> header introduced in C++11. std::atomic allows programmers to safely operate on data that is shared by multiple threads, ensuring that each operation is indivisible and cannot be interrupted by other threads. Atomicity of an individual operation is important, but what about the ordering of multiple atomic…

--

--

CMP

Software engineer specializing in operating systems, navigating the intracicies of the C++ language and systems programming.