[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: KMP at MIT-MC, (BUG LISP) at MIT-MC
- From: HIC at MIT-MC (Howard I. Cannon)
- Date: Fri, 12 Jan 79 00:02:00 GMT
- Original-date: 11 JAN 1979 1902-EST
Date: 10 JAN 1979 2107-EST
From: KMP at MIT-MC (Kent M. Pitman)
Jonl tells me that it is undefined what state the world will be in if
the following piece of code is executed typing a control-G in the place
where each READLINE is ...
(UNWIND-PROTECT (READLINE) (NOINTERRUPT NIL) (READLINE) (SETQ SOMETHING 'FOO))
What will happen, and if it is not clear can something be defined?
Having to say "Well, don't do anything major in an UNWIND-PROTECT..."
isn't really saying anything powerful for it.
It is **PRECISLY** defined what will happen. When the "unwind-protect" forms
are run, the UNWIND-PROTECT frame to which they belong has been popped
first. This way an error in the unwind protect forms, for example, will
not cause a loop. Also, how else couls THROW's out of unwind-protect handlers
work?? That is why NOINTERRUPT T is done, so that an asynchronous interrupt
can't cause the forms not to be run!!