[gclist] Allowing finalizers to wait for the messiah.

Charles Fiterman cef@geodesic.com
Thu, 22 May 1997 14:52:14 -0500


At 11:44 AM 5/22/97, you wrote:
>| Prompt. Your job doesn't have to run a billion years to
>|         get its finalizers run. You aren't running one
>|         finalizer per collection cycle.
>
>"Prompt" is in direct collision with our current ability to write generational
>collectors. As long as I have a generation of objects that I'm not going to
>collect any more often than once per messianic era, I either can't put
>finalizable objects in that generation [which restricts the collector and
>creates overhead as finalizable objects clog the young generations] or it just
>won't get finalized "promptly."

Agreed. I separated the five requirements.

Absolutely mandatory are safe and general. Creating loose pointers is
simply not an option. Especially if a malicious programmer wants to.

Very nice are sure and prompt. Nothing prevents you from running all
finalizers at end of job. Presumably your job will end before Elijah
shows up at the passover table and if not you wont come to work the
next day anyway. Talmud says "If you are planting a tree when the
messiah comes first finish planting the tree then go bless the messiah."
You don't have to debug your program. Also you can throw an exception
on dancingMountainDetect() and bring your program to an end.

Not required but useful is ordered. A language specification can
say finalizer order is undefined. The alternatives are very complex
to put in a language specification because you have to discuss
collection cycles and what happens if A must be before B but B
is finalized a cycle before A. Allowing the very weak ordered
requirement to squash the absolutely mandatory safe requirement and
the very useful sure and prompt requirements is simply wrong.

As I said we can meet all the requirements but its expensive. How prompt
is a quality of implementation issue. 

			-
Charles Fiterman		Geodesic Systems
414 North Orleans Suite 410	Phone 312 832 1221 x223
Chicago IL 60610-4418		FAX   312 832 1230
				http://www.geodesic.com

A young man saw a product advertised in a magazine that said
"Guaranteed 100% effective against bugs when properly used."
He sent away and got two blocks of wood with the instructions
"Place bug on block A, strike sharply with block B." Debuggers
are like that, and you can get stung while using them. Great
Circle tries to be something better than that.