Re: JavaMemoryModel: Proposed Final Specification

From: Bill Pugh (
Date: Tue May 18 2004 - 21:34:41 EDT

On May 18, 2004, at 7:23 PM, Sylvia Else wrote:

> At 02:16 PM 18/05/2004 -0400, you wrote:
>> The Java memory model is done!
>> Just kidding. We have put out a specification document that we think
>> reflects everyone's many years of good work on the memory model. If
>> you all agree to it, we would encourage it as our final document.
> It still contains nothing about the interactions of the memory model
> with the java.lang.ref.Reference classes.
> There are some things that could reasonably be said about the
> invocation of the Reference.get() method that returns null:
> The end of the constructor for the referent happens-before the
> invocation returns.
> The return from the invocation comes-after the reachability decision
> point in which the referent is declared unreachable. This impinges on
> the synchronization order in certain situations.
> It grieves me to have to do this, but as my previous comments about
> the Reference class interactions have not been responded to, I need to
> point out that under the community process, issues raised have to be
> answered, even if the answer is of the form "we're not going to deal
> with that issue".
> Sylvia.

Sorry, things have been busy, and Jeremy and I have been moving from
one firefight to another.

The framework we provided for reachability decisions and finalization
obviously provides hooks for handling

We'll get something together over the next day.

We could provide hb orderings from the constructor to both:
* a get method that returns null
* a reference being returned from a reference queue
but the use case for both is dubious, since you can't get access to the
object through
the reference. However, it is possible that other writes happen before
the construction,
and you need to be ordered with respect to that.

The biggest problem is trying to formalize all of the weak, soft and
phantom reference stuff.
Doable, just a lot of work.

We'll get it done.


JavaMemoryModel mailing list -

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