Re: JavaMemoryModel: How figure 2 example is forbidden by the original JMM

From: Bill Pugh (
Date: Tue Nov 11 2003 - 14:16:08 EST

At 8:02 PM +0800 11/11/03, Fang Weijian wrote:
>Hello everybody,
>I am reading JSR-133 produced on Oct 17, 2003. It said the example in figure
>2 is forbidden by the original JMM (JLS chapter 17). The example is:
>Why can't we have a use-block:
>Since the thread working memory can keep "its own working copy of variables"
>(from JLS), which means there can be multiple simultaneously cached
>variables, so the thread can use a copy without load.
>I am very confused. I really appreciate someone can help me!

I believe the correct interpretation of that clause is that a thread
can have only one working copy of each variable.

However, there have been at least a half dozen academic papers trying
to understand the original JMM, all of which interpret something

While I could argue about which interpretation is correct, I think
the most convincing argument is that the original specification is
unclear and needs to be fixed.

JavaMemoryModel mailing list -

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