From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: The order of objects returned from a guardian Date: Sun, 31 Jul 2005 22:31:18 +0300 Message-ID: <87oe8iai2h.fsf@zagadka.de> References: <873bq1gn15.fsf@zagadka.de> <42E95E34.10903@ossau.uklinux.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1122839923 2513 80.91.229.2 (31 Jul 2005 19:58:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 31 Jul 2005 19:58:43 +0000 (UTC) Cc: guile-user@gnu.org, guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Jul 31 21:58:41 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DzJxD-0007xF-V9 for guile-devel@m.gmane.org; Sun, 31 Jul 2005 21:58:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DzJzo-0006wm-6l for guile-devel@m.gmane.org; Sun, 31 Jul 2005 16:01:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DzJyw-0006Q2-9D for guile-devel@gnu.org; Sun, 31 Jul 2005 16:00:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DzJyr-0006Nd-Ec for guile-devel@gnu.org; Sun, 31 Jul 2005 16:00:18 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DzJyq-00063P-8r for guile-devel@gnu.org; Sun, 31 Jul 2005 16:00:16 -0400 Original-Received: from [213.243.153.35] (helo=smtp2.pp.htv.fi) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DzJim-0006YC-7R for guile-devel@gnu.org; Sun, 31 Jul 2005 15:43:40 -0400 Original-Received: from zagadka.ping.de (cs181072157.pp.htv.fi [82.181.72.157]) by smtp2.pp.htv.fi (Postfix) with SMTP id D1A8F296B76 for ; Sun, 31 Jul 2005 22:31:17 +0300 (EEST) Original-Received: (qmail 4128 invoked by uid 1000); 31 Jul 2005 19:31:18 -0000 Original-To: Neil Jerram In-Reply-To: <42E95E34.10903@ossau.uklinux.net> (Neil Jerram's message of "Thu, 28 Jul 2005 23:37:40 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5177 gmane.lisp.guile.user:4666 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:4666 Neil Jerram 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-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel