The language specification guarantees that reading or writing a variable is atomic unless the variable is of type long or double [jls, 17.4.7] Fortunately, the value initializing constructor of an integral atomic is constexpr, so the above leads to constant initialization Note that atomic is contextual In this case, the upsert operation only needs to be atomic with respect to operations on the answers table in the database The computer can be free to do other things as long as they don't affect (or are affected by) the result of what upsert is trying to do. Objects of atomic types are the only c++ objects that are free from data races
Why the standard make that difference It seems as both designate, in the same way, an atomic type. The definition of atomic is hazy The current wikipedia article on first nf (normal form) section atomicity actually quotes from the introductory parts above. I remember i came across certain types in the c language called atomic types, but we have never studied them So, how do they differ from regular types like int,float,double,long etc., and what are.
The last two are identical Atomic is the default behavior (note that it is not actually a keyword Assuming that you are @synthesizing the method implementations, atomic vs
OPEN