RE: JavaMemoryModel: Weak fairness in the Java memory model

From: David Holmes (
Date: Mon Apr 12 2004 - 19:17:16 EDT

Bill Pugh wrote:
> However, it does make it pretty difficult for the compiler
> to do some undesirable transformations, such as
> hoisting the volatile read out of the loop.

Surely these are the sorts of optimisations that could never be made on
volatiles - memory visibility aside - the compiler must always re-read a
volatile as per the code in the program. ???

David Holmes

JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:01:03 EDT