unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Egil Moeller <redhog@redhog.org>
Subject: out-of-order GC
Date: Sun, 29 Dec 2002 17:36:28 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.30.0212291728430.1884-100000@urd.norna.redhog.org> (raw)

Hi!
I have a problem developing an extension library to guile in C: I have two
types of SMOBs, of which the first one represents a connection, and the
second one a transaction on such a connection. A transaction is created
by sending some data over the connection, and a handle will be returned,
which is then sent back over the connection to close the transaction.
Thus, the transaction-SMOB must contain a reference to the connection-SMOB
that was used to create it. The problem araises if no external reference
exist neither to a connection, nor to a transaction on that connection,
and both of them lost their external referrences before a GC. In this
case, it might happend that the connection-SMOB i first freed, and then
the transaction-SMOB. But the transaction-SMOB-free-routine will now
crash, as it tries to access the connection, which has allready been
deleted. How should I solve this problem? It is sufficient if the
transaction-SMOB-free-routine is notified about that the connection was
previously closed, and thus it is able to not take any action to send the
close-transaction-command (it would be nicer, thought, if one could force
the transaction-SMOB-free-routine to be called _before_ the
connection-SMOB-free-routine).
Regards,
Egil

-- 
http://redhog.org
GPG Public key: http://redhog.org/PGP%20Public%20key.asc
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


             reply	other threads:[~2002-12-29 16:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-29 16:36 Egil Moeller [this message]
2002-12-30 13:36 ` out-of-order GC Greg Troxel
2002-12-30 14:05   ` Egil Moeller
2002-12-31  3:06     ` Matt Hellige
2002-12-31 20:13     ` Neil Jerram
2003-01-01 10:57       ` Egil Moeller
2003-01-01 17:58         ` Neil Jerram
2003-01-01 21:22         ` 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=Pine.LNX.4.30.0212291728430.1884-100000@urd.norna.redhog.org \
    --to=redhog@redhog.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).