[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

Difference between two abort from restart

james

8/28/2015 2:30:00 AM

I got an error and get two abort options from Restart, what's the difference between the restart option 1 and 2. I tried both option 1 and 2, seems they have the same result.

arithmetic error DIVISION-BY-ZERO signalled
Operation was /, operands (1 0).
[Condition of type DIVISION-BY-ZERO]

Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [ABORT] abort thread (#<THREAD "new-repl-thread" RUNNING {1003E96C33}>)
1 Answer

Pascal J. Bourguignon

8/28/2015 3:17:00 AM

0

james <dinglei2008@gmail.com> writes:

> I got an error and get two abort options from Restart, what's the
> difference between the restart option 1 and 2. I tried both option 1
> and 2, seems they have the same result.
>
> arithmetic error DIVISION-BY-ZERO signalled
> Operation was /, operands (1 0).
> [Condition of type DIVISION-BY-ZERO]
>
> Restarts:
> 0: [RETRY] Retry SLIME REPL evaluation request.
> 1: [*ABORT] Return to SLIME's top level.
> 2: [ABORT] abort thread (#<THREAD "new-repl-thread" RUNNING {1003E96C33}>)

The first ABORT restart is established by slime,
the second by the inferior lisp.

Since ABORT will probably just perform a non-local exit, covered with
unwind-protect clearn-ups, there are indeed chances that you will get
exactly the same side effects by using either ABORT restart. However
clearly different paths are taken, and it's quite possible that
selecting the first ABORT, which makes slime revert normally to the
top-level, would involve different or additionnal side effects on the
part of that top-level. Notably, the thread could stay alive running
that REPL. (But not if it's a one-shot worker thread like what you get
from C-x C-e).



--
__Pascal Bourguignon__ http://www.informat...
â??The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.� -- Carl Bass CEO Autodesk