alive-lsp
alive-lsp copied to clipboard
Difficulty killing runaway threads
The following:
(in-package :cl-user)
(defun infinity ()
(loop do (progn (print "Hello, World!")) (sleep 1)))
(infinity)
can be killed using the Threads tree view without any issue. It happens immediately.
Removing the sleep
call:
(in-package :cl-user)
(defun infinity ()
(loop do (progn (print "Hello, World!"))))
(infinity)
seems to lock up the LSP, making it virtually impossible to kill the thread. It is necessary to restart the LSP using Developer: Reload Window or kill VSCode and restart it. Even that takes a non-trivial amount of time.
There may be nothing to do here other than avoiding code with tight infinite loops.
Interesting (or not):
(defun crap ()
(loop))
(crap)
does not lock up the LSP. There is a thread that doesn't go away but it can be killed.