upvote
The well-known C++ Core Guidelines say this:

> Atomic variables can be used simply and safely, as long as you are using the sequentially consistent memory model (memory_order_seq_cst), which is the default.

That’s from https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines

A lot of companies’ in-house guidelines then say you are allowed to use acquire/release if you are implementing a lock, relaxed if are implementing a counter.

This IMO probably reflects most companies’ distrust in their own developers to develop lock free data structures.

reply