Answer by Nitsan Wakart for Java atomic lazySet
Quick correction to above: lazySet is not part of the JMM. It's a late addition to the JDK an is a documented feature, but as of yet has not made it into the official JMM. You can read more about where...
View ArticleAnswer by kittylyst for Java atomic lazySet
My reading of this is that: If, in T2, ai.get() returns 0 before you call ai.lazySet(1), then the x=42 write will also be visible in T2.This is the transitivity property of happens-before from the...
View ArticleJava atomic lazySet
Suppose I have an AtomicInteger value, ai. In thread T1, I do:x = 42 // x is a non-volatile shared integerai.lazySet(0);AFAIK, in another thread ifai.get() returns 0, the write x=42 will also be...
View Article
More Pages to Explore .....