[Top][All Lists]

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

Re: Procedure proposal: call-with-escape-procedure

From: Marius Vollmer
Subject: Re: Procedure proposal: call-with-escape-procedure
Date: 07 Mar 2001 00:10:14 +0100
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7

Miroslav Silovic <address@hidden> writes:

> Marius Vollmer <address@hidden> writes:
> > The important thing here is that continuations created by call/cc do
> > not run the escape handlers established by escape-protect.
> What about a normal exit from escape-protect? You don't know whether
> you're coming back, and if escape-protect is (for example) supposed to
> close a file, it should run.

Hmm, I'm not sure if I understand you completely.  Are you saying that
call/ec and escape-protect are not necessary and one could just do
something like this instead?

    (let ((first-time #t))
        (lambda ()
          (if (not first-time)
              (error "I can't be restarted"))
          (set! first-time #f))
        (lambda ()
          compute away)
        (lambda ()

This prevents the use of call/cc to implement a suspend/resume model
(for coroutines say).  Suspend/resume should be no problem for the

reply via email to

[Prev in Thread] Current Thread [Next in Thread]