Quantcast
Channel: Atomicity of Reads and Writes for Variables in Java - Stack Overflow
Browsing all 3 articles
Browse latest View live

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 Article



Answer 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 Article

Atomicity 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
Browsing all 3 articles
Browse latest View live


Latest Images