> > Will some thread B calling getLength() ever see [unexpected] results?
> It's possible.
Oooo, that's just nasty! Are all of you "okay" with this proposed
behavior? ISTM (it seems to me) that to get any use out of volatile, you'd
have to declare nearly every member of a potentially shared class as
> Volatiles only preserve their assignment order with other volatiles and
> synch blocks, not with assignments to every field in every object
> the object in which the volatile is declared).
Why not further define the semantics of volatile to declare that
non-volatile accesses cannot be re-ordered amongst volatile accesses? Is
that not much more reasonable and useful? If not then volatile is
-- Dave Smiley
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:31 EDT