At 02:40 PM 20/04/2004 -0400, Bill Pugh wrote:
The point is that most finalizers are not synchronized.
>So declaring them all to be broken is a big step we'd like to avoid.
>
>So I think we need to ensure that r1 will be equal to -1.
After reading Hans' reply to my response to this message, I'm starting to
think that maybe they are mostly broken anyway, unless it's decided to have
a happens-before edge from every access of an object to its finalizer. I
accept Hans' argument that that has unacceptable consequences.
Merely ensuring that the finalizer sees all writes to the object being
finalized doesn't improves things much.
Even the happens-before solution doesn't fix finalizers that access
external resources, which is what I think Hans was alluding to.
If the message is that finalize methods, and weak/soft/phantom reference
handlers, that are not synchronized, are very likely broken, then they all
need to be examined again, or some will become manifestly broken sooner or
later.
Any 'solution' that doesn't prevent premature finalization is only going to
fix some of these, and without looking at them, no one knows which they are.
Sylvia.
-------------------------------
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