Re: JavaMemoryModel: Another important finalizer question

From: Bill Pugh (pugh@cs.umd.edu)
Date: Mon Apr 19 2004 - 22:29:27 EDT


On Apr 19, 2004, at 8:24 PM, Boehm, Hans wrote:

> Presumably the existing statement is meaningful for final fields in
> any case.
>
> As I see it, the main argument for the stronger version is that it
> avoids
> having to synchronize constructors, which the syntax doesn't allow.
> Since
> the implementation cost is probably essentially zero, that's not a bad
> argument.
>
> I agree.
>
> Hans

Plus, I think we can try to convince people that they need to use
synchronization
in finalizers if their class is mutable. But convincing people to use
synchronization
so that their finalizer can see the results of construction will be a
hard sell, and I suspect
few people will do it.

        Bill

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



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