Neil Jerram <[EMAIL PROTECTED]> writes: >> If you do, you would need to take care of the ordering yourself, which >> is quite easy by keeping objects alive in a global data structure >> until they are no longer needed. > > Not sure what you mean by this, though. How would this generate an > ordering?
Say you need BAR during the finalization of FOO. In order to ensure that BAR is not itself finalized before FOO is, you can keep BAR accessible by putting it into a global data structure. As long as BAR is accessible, it will not be returend by a guardian. When you have finalized FOO, you can remove BAR from that data structure. (I am a bit worried right now that the 'obvious' approach of putting FOO and BAR into a weak key hashtable with FOO as the key and BAR as the value does conflict a bit with my original goal of breaking up cycles from strong values to weak keys. With the code that I have now, both FOO and BAR are not considered accessible just by virtue of being in the hashtable. Thus, once FOO is considered inaccessible, BAR might be inaccessible as well; both could be returned from guardians in any order. Hmm.) -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user