If I run the example in the CLHS page of CLEAR-INPUT,
Example: HU> (defun read-sleepily (&optional (clear-p nil) (zzz 0)) (list (progn (print '>) (read)) ;; Note that input typed within the first ZZZ seconds ;; will be discarded. (progn (print '>) (if zzz (sleep zzz)) (print '>>) (if clear-p (clear-input)) (read)))) READ-SLEEPILY HU> (read-sleepily t 10)
10
20
30
End Example
I get this:
Recursive lock attempt #S(SB-THREAD:MUTEX :NAME "buffer read lock" :%OWNER #<SB-THREAD:THREAD "repl-thread" RUNNING {BC10BB1}> :STATE 1). [Condition of type SIMPLE-ERROR]
Backtrace: 0: (SB-THREAD:GET-MUTEX #<unavailable argument> #<unavailable argument> #<unavailable argument>) 1: ((FLET #:WITHOUT-INTERRUPTS-BODY-[CALL-WITH-MUTEX]477)) 2: ((LAMBDA (SWANK-BACKEND::LOCK FUNCTION)) #S(SB-THREAD:MUTEX :NAME "buffer read lock" :%OWNER #<SB-THREAD:THREAD "repl-thread" RUNNING {BC10BB1}> :STATE 1) #<CLOSURE (LAMBDA NIL) {C1FDE25}>) 3: (SWANK-BACKEND:CALL-WITH-LOCK-HELD #S(SB-THREAD:MUTEX :NAME "buffer read lock" :%OWNER #<SB-THREAD:THREAD "repl-thread" RUNNING {BC10BB1}> :STATE 1) #<CLOSURE (LAMBDA NIL) {C1FDE25}>) 4: ((SB-PCL::FAST-METHOD SB-GRAY:STREAM-CLEAR-INPUT (SWANK-BACKEND::SLIME-INPUT-STREAM)) #(3 NIL 4 NIL 5 NIL) #<unused argument> #<SWANK-BACKEND::SLIME-INPUT-STREAM {B9C4011}>) 5: (CLEAR-INPUT #<SWANK-BACKEND::SLIME-INPUT-STREAM {B9C4011}>) 6: (SWANK::CLEAR-USER-INPUT) 7: (SWANK::REPL-EVAL "30 ")