Re: JavaMemoryModel: References

From: Bill Pugh (pugh@cs.umd.edu)
Date: Fri May 21 2004 - 13:24:11 EDT


On May 20, 2004, at 9:34 PM, Sylvia Else wrote:

> Bill,
>
> Taking the content of your two postings about this subject together, I
> would be reasonably content with a statement along the lines of
>
> Decisions about reachability for the purposes of the Reference
> subclasses follow the rules specified for finalization, with
> transitions between
> levels of reachability being decided on the same basis and at the same
> decision points.
>
> The reference classes shall behave as if the referent were held in a
> volatile field. This field is deemed to have been read by the thread
> that obtains the Reference by calling a method of the ReferenceQueue
> class, and to have been written by the Reference.enque() method.
>
> These statements, or equivalent wording, probably belong in the API
> rather than the memory model spec, but I do think they are still part
> of JSR133.
>
> Sylvia.
>

I suspect we are too late to change the implementation or Javadoc for
1.5.0.
But I have filed it as a bug report. It is pretty clear that the fix to
Reference (making referant volatile) should be made to pre-Tiger
versions,
so I'm going to just declare this to be a bug fix rather than part of
133.

        Bill

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



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