Re: JavaMemoryModel: Questions about the proposed semantics

From: Alex Gontmakher (
Date: Wed May 09 2001 - 23:22:24 EDT

References: <>

> I think there were some formatting problems in your example. I am
> finding it very hard to understand your example. I think things did
> not line up in the columns you intended them to; I can't figure out
> what Execution 1 is, or what Execution 2 is.Here is what was posted:

I'm sorry, I've written this as a formatted message including tables
(Netscape mailer), and it obviously translated that to a not very
readable text.
If you don't have an HTML-capable mail client (and again, I'm sorry I
have not taken that into account), here are the examples in plain text:

In the first example, the execution 1 is:
    1. x=1
    //------------- no barriers
    2. x=2
    3. x==1
and the execution 2 is:
    1. x==1
     //---------------- no barriers
     2. x=2
     3. x==1
These are two excerpts from two DIFFERENT executions, not two threads of
In the second example, the execution of Thread 1 is:
    while (true)
and the execution of Thread 2 is:
    int k = -INF;
    while (true) {
        if (k>i) OUCH;
        k = i;
In this case, these are two threads of THE SAME execution.
JavaMemoryModel mailing list -

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