branch: externals/sly commit 00cbab08c3d8d2ba7f27f3176b7fd2790c61b028 Author: Marius Gerbershagen <marius.gerbersha...@gmail.com> Commit: João Távora <joaotav...@gmail.com>
Slynk: avoid race conditions when killing threads Threads may die after we check whether they are alive, but before we execute kill-thread. This can lead to spurious errors, e.g. on slime startup. * slynk/slynk.lisp (sentinel-stop-server) (cleanup-connection-threads): Use ignore-errors. Co-authored-by: João Távora <joaotav...@gmail.com> Cherry-picked-from: SLIME commit 1ea0e6ae54a07b1046e4c4c9e674acf0e855e0e2 --- slynk/slynk.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slynk/slynk.lisp b/slynk/slynk.lisp index c6fb5b0..f89f7f1 100644 --- a/slynk/slynk.lisp +++ b/slynk/slynk.lisp @@ -775,7 +775,7 @@ recently established one." (when (and thread (thread-alive-p thread) (not (eq thread (current-thread)))) - (kill-thread thread)))) + (ignore-errors (kill-thread thread))))) (t (warn "No server for ~s: ~s" key value))))) @@ -1452,7 +1452,7 @@ event was found." (when (and thread (thread-alive-p thread) (not (equal (current-thread) thread))) - (kill-thread thread))))) + (ignore-errors (kill-thread thread)))))) ;;;;;; Signal driven IO