Answer by Gray for Atomicity of Reads and Writes for Variables in Java
... it means that during this atomic operation (executed by threadX), no other threadY is allowed to access (for either read or write) that same variable i2, hence, no other threadY, is allowed to...
View ArticleAnswer by Oliver Dain for Atomicity of Reads and Writes for Variables in Java
To the best of my knowledge there is no atomic i1 = i2 operation. You can atomically read an int and you can atomically write to one, but you can't do both in the same operation with synchronization....
View ArticleAtomicity of Reads and Writes for Variables in Java
this is a followup on another question of mine.@templatetypedef answered the question (appreciated), and in his answer he wrote:As a note - atomicity does not mean "all other threads will be blocked...
View Article