unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* out-of-order GC
@ 2002-12-29 16:36 Egil Moeller
  2002-12-30 13:36 ` Greg Troxel
  0 siblings, 1 reply; 8+ messages in thread
From: Egil Moeller @ 2002-12-29 16:36 UTC (permalink / 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-01-01 21:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-29 16:36 out-of-order GC Egil Moeller
2002-12-30 13:36 ` 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

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).