Closed Affonso-Gui closed 2 years ago
do-until-key and other functions that use select-stream don't work as expected.
do-until-key
select-stream
(defmacro do-until-key-with-check (check &rest forms) `(prog1 (while (and (null (select-stream (list *standard-input*) 0.0000001)) (eval ,check)) ,@forms ) (let ((strm (car (select-stream (list *standard-input*) 0.1)))) (if strm (read-line strm nil nil))) ))
This is happening because since there is no active read call to the stream the slime read-mode is not activated, causing input to be classified as a new repl request which is put on standby until the first evaluation is done.
slime-events
(:emacs-rex (swank-repl:listener-eval "(do-until-key (print 1) (unix:sleep 1))\n") "USER" :repl-thread 61) (:write-string "1\n") (:write-string "1\n") (:write-string "1\n") (:emacs-rex (swank-repl:listener-eval "end\n") "USER" :repl-thread 62) (:write-string "1\n") (:write-string "1\n")
inferior-lisp
[DEBUG - server:L80] raw header: 000046 [DEBUG - server:L87] raw data: (:emacs-rex (swank-repl:listener-eval "end ") "USER" :repl-thread 62) [DEBUG - protocol:L69] Processing id: 62 ... [INFO - protocol:L71] func: swank_repl_listener_eval [INFO - protocol:L72] args: [u'end\n'] [DEBUG - handler:L216] Acquiring lock: <thread.lock object at 0x7fb27b0df590> [DEBUG - server:L45] output: 1 [DEBUG - server:L45] output: 1
Fixed in https://github.com/Affonso-Gui/euslime/commit/d246ce658c630ef20b801e2397e22832d38a53d5
do-until-key
and other functions that useselect-stream
don't work as expected.This is happening because since there is no active read call to the stream the slime read-mode is not activated, causing input to be classified as a new repl request which is put on standby until the first evaluation is done.
slime-events
inferior-lisp