[concurrency-interest] Object finalization

Bob Lee crazybob at crazybob.org
Tue May 15 14:43:43 EDT 2012

So there isn't any confusion, the original code is safe without null checks
in the finalizer. While the finalizer can run concurrently with other
methods, the JLS
the constructor will finish before the finalizer runs: "The completion
of an object's constructor happens-before (§17.4.5) the execution of its
finalize method (in the formal sense of happens-before)."

Hans, I used your static volatile pinning trick in an experimental
ThreadLocal implementation I wrote. :-)

See the "pin" field:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20120515/b99bd728/attachment.html>

More information about the Concurrency-interest mailing list