On Sat, 11 Sep 2004, David Lichteblau wrote:
> What about code which does not involve the REPL at all? How would
> things work with a background thread, which is not running in a REPL but
> triggers stack overflow and opens the debugger, where the user then
> selects a restart?
Oh. "Good point." Something along the lines of
would probably be the way to go then. Unfortunately not quite so easy: the
above the reprotection happens before enough stack has been unwound,
retriggering the guard page. Apparently some stack-frobbing is needed to
insert the cleanup action at the appropriate point, but I've virtually no
clue how to actually do it.
> No, invoking TOPLEVEL should restart _at_ the toplevel, not restart the
> toplevel itself, right? The repl fun, in the case of aclrepl, is a
> closure keeping the state of the listener. ISTR that accidental loss of
> REPL state was precisely what happened with older code, and that
> Christophe's current repl fun scheme fixed this.
Oh yes. I remember this now. Though I must say that really restarting the
REPL and losing all the attendant state is something I've wanted to do on
occasion, and the only recourse has been a nesting call to TOPLEVEL-REPL.
Blech. Not that I'm advocating adding a restart for that -- but maybe a
-- Nikodemus Schemer: "Buddha is small, clean, and serious."
Lispnik: "Buddha is big, has hairy armpits, and laughs."