Hi Ogata,

On 09/04/2017 07:20 AM, Kazunori Ogata wrote:
4) Put reference to ClassDataSlot[] into a final field of an object, read
the final field immediately after the object creation, and store it to
non-volatile dataLayout.  I think this is also correct based on the
semantics of final fields and data dependency.
   Webrev:http://cr.openjdk.java.net/~horii/8187033/webrev.01-final2/

I'm sure others will tell you that final field semantics only works across threads when you also read the final field in the other thread from the thread that writes to it. Storing and reading the final field in the same thread won't help order the write to a non final field after writes that precede it in program order nor to order the read of a non-final field in the other thread before reads that follow it in program order.

Regards, Peter

Reply via email to