[slime-devel] SBCL's with-timeout failed with slime-input-stream
Helmut Eller
heller at common-lisp.net
Wed Dec 1 15:30:56 UTC 2010
* Jianshi Huang [2010-12-01 09:42] writes:
> Hi,
>
> I'm using SLIME (2010-11-07) with SBCL(1.0.44.22) on Linux x8664.
>
> The following code should signal an sb-ext:timeout condition but
> with-timeout isn't functioning on slime-input-stream
>
> with-timeout works with SBCL started from terminal.
>
> (sb-ext:with-timeout 1 (read *standard-input*))
>
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.
That's probably just one of many problems of the with-timeout construct
and we would like to get rid of it and replace it with a timeout
argument to sb-thread:condition-wait. That's not a new issue and adding
the timeout argument doesn't sound like rocket science but it doesn't
seem to be a priority for the SBCL maintainers. Maybe somebody could
hire Nikodemus to finally implement it.
Helmut
More information about the slime-devel
mailing list