[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: continuations and threads

This page is part of the web mail archives of SRFI 18 from before July 7th, 2015. The new archives for SRFI 18 contain all messages, not just those from before July 7th, 2015.

> I understand what you're saying, but you haven't addressed my concern
> (re-quoted above) at all.

I'm sorry I misunderstood you.

> >> I *want* the C stack to be unwound, so that the Scheme
> >> heap references in the C activation records get freed

Well... I *don't* want the C stack to be unwound --- yet.  :) That C
stack frame is still live, because S2 might yet return.  So its heap
references should not be freed.

The discipline I've described has more expressive power than the one
you described.  In order to provide that additional power, we have to
keep that C stack frame around longer, because we can't be sure yet
that we don't still need it.  It's still potentially relevant to the
computation, so we can't throw it away.

If C2 returns, then we'll destroy that frame.  If S1 or C1 returns,
we'll destroy both of those frames.

(I promise I'm not being deliberately dense; I just don't understand
your misunderstanding.  :) You'll need to expand on your question, I