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

structured non-local exits win again



(setq alarmclock '(lambda (x) (nointerrupt nil) (*throw 'frobozz 'timed-out)))
(defun frobozz ()
  (*catch 'frobozz
     (unwind-protect (alarmclock 'time 1)
	(sleep 5.)
	(alarmclock 'time nil))))
(frobozz)
  => TIMED-OUT
; Only problem is, UNREAL contains -1 !  We are left in (NOINTERRUPT T)
mode.  This example is somewhat forced, but this kind of thing can
happen from various timing problems.