slyblime
slyblime copied to clipboard
Race condition with `:read-mode`
It seems like for some reason, there is a desynchronisation between setting the read-mode
and receiving input, and eventually Slynk decides it just wants to show a prompt and then we have a problem but I'm not exactly clear why.
How to reproduce:
- Start any function which continually demands
(read-line)
and keeps demanding it on no-input - Press and hold enter until the error appears.
Log files:
Earlier up
b'(:channel-send 1 (:set-read-mode :read))'
b'000026(:EMACS-CHANNEL-SEND 1 (:PROCESS "\n"))'
b'(:channel-send 1 (:set-read-mode :finished-reading))'
Just before the error:
b'000026(:EMACS-CHANNEL-SEND 1 (:PROCESS "\n"))'
b'(:channel-send 1 (:set-read-mode :read))'
b'(:channel-send 1 (:set-read-mode :finished-reading))'
b'000025(:EMACS-CHANNEL-SEND 1 (:PROCESS ""))'
write: [...]
b'(:channel-send 1 (:set-read-mode :read))'
b'(:channel-send 1 (:set-read-mode :finished-reading))'
b'(:channel-send 1 (:prompt "COMMON-LISP-USER" "CL-USER" 1 "#<END-OF-FILE #x30200190788D>"))'
b'000025(:EMACS-CHANNEL-SEND 1 (:PROCESS ""))'
One theory is that after process
command is sent, no other things must be sent to be processed until finished-read
is sent.