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:
>use-block=(use)*
>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
differently.
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.
Bill
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:53 EDT