RE: JavaMemoryModel: A different slant with reference leakage

From: David Holmes (
Date: Mon Jan 19 2004 - 19:33:24 EST

> At 04:45 PM 19/01/2004, David Holmes wrote:
> > But the basic "rule" that tells the programmer they may have a
> > problem is quite simple: in the absence of synchronization a
> > variable read may return any value that it has ever held in the

Sylvia Else responded:
> However, this begs that question "what values has the
> variable held?" The causality test cases show that the
> answers to this question can be unexpected.

>From a practical stand-point I don't expect programmers to be trying
to perform detailed analysis of the dynamic properties of their
programs, such that the mind-boggling issues of causality come into
play. In the context of the given example, simple code inspection
shows what values a variable may hold over time. In the absence of any
stronger requirement I would assume all such values are possible to be
read. The not-out-of-thin-air property would discount any other values
from being read.

David Holmes

JavaMemoryModel mailing list -

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