[concurrency-interest] DirectByteBuffers and reachabilityFence

Andrew Haley aph at redhat.com
Wed Dec 9 05:35:13 EST 2015


On 09/12/15 09:21, David Holmes wrote:

> The happens-before requirement was deliberately set the way it is to
> show that an object can not be finalized before its construction has
> completed (whether normally or abnormally). So I would agree with
> Justin that it should not be possible for an object to be finalized
> before construction has completed - regardless of potential compiler
> optimizations etc.

Hmmm, okay.  It might be that I misremembered or perhaps it was a bug,
but I don't think so.  Is there really a happens-before relationship
between a constructor of an object with no volatile or final fields
and its finalizer?

Andrew.


More information about the Concurrency-interest mailing list