I'm confused about how does the atomic post-increment actually work. For example
std::atomic<int> a = 1; // global void func(int i) { std::cout << i; } // execute the following in two threads func(a++); I believe a finally becomes 3, but is it possible to see the output "11"? Is it safe to expect one of the two threads will definitely see a became 2?