This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: call-with-dynamic-root and fluids
- To: Mikael Djurfeldt <djurfeldt at nada dot kth dot se>
- Subject: Re: call-with-dynamic-root and fluids
- From: Marius Vollmer <mvo at zagadka dot ping dot de>
- Date: 21 Mar 2000 20:38:13 +0100
- Cc: guile at sourceware dot cygnus dot com
- References: <E12XOrj-0007s7-00@mdj.nada.kth.se>
Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:
> Is anyone using `call-with-dynamic-root'?
Yes, I'm using it, but I'm not sure whether I like its current
behaviour.
I use it with the Gtk+ bindings, when the Gtk side wants to invoke a
Scheme callback. I wanted to make absolutely sure that control
returns to Gtk in a way that it doesn't get confused, i.e. just like C
guarantees it. I don't want the Scheme callback to be able to capture
a continuation and mess up Gtk later.
What I don't like about dynamic roots is that they walk up and down
the dynamic wind chain. For root local storage, we now have fluids
and thus don't need to use dynamic-wind to maintain some form of
dynamic binding between roots. I think each root can have its own
wind chain.
What I really want from dynamic roots is, as you said, being able to
seal off some Scheme computation so that it returns exactly once, and
in a strictly nested fashion with respect to other sealed
computations. If we have a meachinsm for that, and let threads do the
rest that dynamic roots do now, I would welcome that.