unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Marius Vollmer <mvo@zagadka.de>
Cc: guile-user@gnu.org, guile-devel@gnu.org
Subject: Re: The order of objects returned from a guardian
Date: Sun, 31 Jul 2005 22:31:18 +0300	[thread overview]
Message-ID: <87oe8iai2h.fsf@zagadka.de> (raw)
In-Reply-To: <42E95E34.10903@ossau.uklinux.net> (Neil Jerram's message of "Thu, 28 Jul 2005 23:37:40 +0100")

Neil Jerram <neil@ossau.uklinux.net> 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


  reply	other threads:[~2005-07-31 19:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-26 23:33 The order of objects returned from a guardian Marius Vollmer
2005-07-27  0:42 ` 64bit guile: one bug found, one improvement suggested Roland Orre
2005-07-28 22:37 ` The order of objects returned from a guardian Neil Jerram
2005-07-31 19:31   ` Marius Vollmer [this message]
2005-07-31 21:25     ` Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oe8iai2h.fsf@zagadka.de \
    --to=mvo@zagadka.de \
    --cc=guile-devel@gnu.org \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).