In some .net documentation I have read this is how the compiler handles volatile:
- *"Reading from a volatile or using the Thread.VolatileRead method is logically an acquire fence"
- "Writing to a volatile or using the Thread.VolatileWrite method is logically a release fence" *
These fences apply at both complier and architecture level.
Of course the main difference in VC++ is that the fence is only applied at complier level.
So my question is, what are the memory reordering prevention semantics of volatile in Java?
Conversion:
Fence = Barrier Barrier = Fence
References:
Joe Duffy (Concurrent Programming on Windows)