RE: JavaMemoryModel: correct synchronization

From: David Holmes (
Date: Mon Feb 23 2004 - 00:16:49 EST

I wrote:
> > AFAIK code motion across sync blocks is prohibited.

Jeremy Manson replied:
> We don't make such general statements about code motion because they have
> holes in them. So, you can, for example, move code across thread-local
> synchronization blocks.

Jeremy: given that thread-local sync is by definition a no-op and hence can
be removed, I would hope that this is the *only* case where this can occur.
In which case I for one, would really like to see this property (albeit a
derived one) of the JMM clearly stated. If not please give another example.

David Holmes

JavaMemoryModel mailing list -

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