Basics of atomic operations in C++
Introduction
In C++11, the <atomic>
header was added to the C++ standard, allowing programmers to perform so-called “atomic” operations. Like an atom in the context of chemistry, atomic operations are “indivisible” — meaning the operation will either appear to have been completed entirely or not happen at all, with no intermediate state visible to others. This article is a gentle introduction to the basic core concepts of atomic operations in C++…