Re: JavaMemoryModel: Draft of JavaOne talk

From: Doug Lea (dl@cs.oswego.edu)
Date: Mon May 29 2000 - 08:50:57 EDT


Josh Bloch pointed out to Bill and me:

> Slide 31: "-Use immutable fields and objects" But this isn't enough under
> the current memory model! They aren't guaranteed to work!

This is a delicate issue: All plausible JMM revisions include safety
of final fields (modulo the caveats discussed on this list). This
issue also arose for me last summer when revising my CPJ book, and I
decided to in general write things up assuming safety of final fields,
adding only a couple of footnotes with disclaimers saying that the JMM
was still under revision. One of the reasons for doing this is that as
of last summer, I didn't know of any JVMs that did not provide
initialization safety of final fields. But there are now many more of
them. Does anyone know of any JVM (maybe on alphas?) that does not?

-Doug

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



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