Could the side effect of atomic operation be seen immediately by other threads?
问题 In this question one replier says Atomicity means that operation either executes fully and all it's side effects are visible , or it does not execute at all. However, below is an example given in Concurrency in Action $Lising 5.5 #include <thread> #include <atomic> #include <iostream> std::atomic<int> x(0),y(0),z(0); std::atomic<bool> go(false); unsigned const loop_count=10; struct read_values { int x,y,z; }; read_values values1[loop_count]; read_values values2[loop_count]; read_values