[slime-devel] SBCL's with-timeout failed with slime-input-stream
Jianshi Huang
jianshi.huang at gmail.com
Thu Dec 2 05:38:38 UTC 2010
Hi Helmut,
On Thu, Dec 2, 2010 at 12:30 AM, Helmut Eller <heller at common-lisp.net> wrote:
> SLIME also uses with-timeout internally. Essentially we have a
> situation like
>
> (sb-ext:with-timeout 1
> (loop
> (sb-ext:with-timeout 0.2
> (handler-case
> (sleep 10000)
> (sb-ext:timeout ()
> (print 'timeout)
> (force-output))))))
>
> The handler doesn't know that the condition was raised by some outer
> with-timeout.
>
I see. But why
(handler-case
(sb-ext:with-timeout 1
(read *standard-input*))
(sb-ext:timeout (c) c))
or
(handler-case
(sb-sys:with-deadline (:seconds 1)
(read *standard-input*))
(sb-sys:deadline-timeout (c) c))
also doesn't work. Interestingly, a #<SB-SYS:DEADLINE-TIMEOUT> is
returned in the second case after I slime-interrupted it.
I think I'm still confused.
--
Jianshi
More information about the slime-devel
mailing list