[Gd-hackers] Gwydion Dylan on MacOS X

Bruce Hoult bruce at hoult.org
Tue Nov 13 22:13:51 CET 2007


On Nov 14, 2007 2:35 AM, Thomas Christian Chust <chust at web.de> wrote:
> Bruce Hoult wrote:
>   2) Set GC_finalize_on_demand = 1 and let the Boehm-Demers-Weiser
>      collector maintain the finalization list for you. Then call
>      GC_run_finalizers from a separate thread or from some kind of
>      program main event loop to drain the list -- this is what my
>      little library does.
>
> Of course the automatic finalization thread cannot be enabled in single
> threaded Dylan, so you have to call drain-finalization-queue manually
> somewhere in your program -- presumably from the main loop of a GUI
> application or in the initialization method of certain objects.

OK, that's reasonable if you don't mind the user having to explicitly
modify their program to do it, and also the possibility of things not
being finalized terribly promptly and, perhaps, expand the heap a lot
if there is code that allocates finalizable objects in a loop and does
not return for a long time.



More information about the hackers mailing list