On Feb 20, 2014, at 9:09 PM, David Holmes <david.hol...@oracle.com> wrote:
> In practice, because there are also final fields in these instances 
> implementations will most likely perform a storestore barrier after 
> construction and prior to setting the reference to the created object.

Yes, that is what i was banking on. 

That is how hotspot behaves, right? 

But, you are saying other VMs might not do so?

Paul.

> That would make non-volatile appear to work, but it would not be guaranteed 
> to do so and the final-field "freeze" action only guarantees that unsafe 
> publication will see the correct value of the final fields (and for final 
> references anything reachable via that reference).
> 


Reply via email to