Oh, by the way, just found a bug in the cmucl source:
multi-proc.lisp:
(defmacro without-scheduling (&body body)
"Execute the body the scheduling disabled."
`(let ((inhibit *inhibit-scheduling*))
(unwind-protect
(progn
(setf *inhibit-scheduling* t)
,@body)
(setf *inhibit-scheduling* inhibit))))
Obviously, this should be:
(defmacro without-scheduling (&body body)
"Execute the body the scheduling disabled."
(let ((sym-inhibit (gensym "inhibit-")))
`(let ((,sym-inhibit *inhibit-scheduling*))
(unwind-protect
(progn
(setf *inhibit-scheduling* t)
,@body)
(setf *inhibit-scheduling* ,sym-inhibit)))))
with-timeout has similar traps in it...
(defmacro with-timeout ((timeout &body timeout-forms) &body body)
"Executes body and returns the values of the last form in body. However, if
the execution takes longer than timeout seconds, abort it and evaluate
timeout-forms, returning the values of last form."
(let ((sym-fn (gensym "fn-"))
(sym-tf (gensym "tf-")))
`(flet ((,sym-fn () . ,body)
(,sym-tf () . ,timeout-forms))
(with-timeout-internal ,timeout #',sym-fn #',sym-tf))))
--
regards, [EMAIL PROTECTED] (o_
Thomas Fischbacher - http://www.cip.physik.uni-muenchen.de/~tf //\
(lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y) V_/_
(if (= x 0) y (g g (- x 1) (* x y)))) n 1)) (Debian GNU)