[slime-cvs] CVS slime

CVS User heller heller at common-lisp.net
Tue Dec 23 08:33:03 UTC 2008


Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv8834

Modified Files:
	ChangeLog swank.lisp 
Log Message:
* swank.lisp (connection): Add a slot to store the auto-flush-thread.
(cleanup-connection-threads): Also kill the auto-flush-thread.

(stop-server): list-threads returns the thread name in second
position and not in first position.

--- /project/slime/cvsroot/slime/ChangeLog	2008/12/23 08:32:51	1.1598
+++ /project/slime/cvsroot/slime/ChangeLog	2008/12/23 08:33:02	1.1599
@@ -1,3 +1,12 @@
+2008-12-23  Sven Van Caekenberghe <sven at beta9.be>
+
+	* swank.lisp (connection): Add a slot to store the
+	auto-flush-thread.
+	(cleanup-connection-threads): Also kill the auto-flush-thread.
+
+	(stop-server): list-threads returns the thread name in second
+	position and not in first position.
+
 2008-12-23  Willem Broekema <metawilm at gmail.com>
 
 	* slime.el (sldb-insert-restarts): Make the space before each
--- /project/slime/cvsroot/slime/swank.lisp	2008/12/09 07:48:20	1.612
+++ /project/slime/cvsroot/slime/swank.lisp	2008/12/23 08:33:03	1.613
@@ -241,6 +241,7 @@
   reader-thread
   control-thread
   repl-thread
+  auto-flush-thread
   ;; Callback functions:
   ;; (SERVE-REQUESTS <this-connection>) serves all pending requests
   ;; from Emacs.
@@ -762,9 +763,8 @@
        (let ((thread-position
               (position-if 
                (lambda (x) 
-                 (string-equal (first x)
-                               (concatenate 'string "Swank "
-                                            (princ-to-string port))))
+                 (string-equal (second x)
+                               (cat "Swank " (princ-to-string port))))
                (list-threads))))
          (when thread-position
            (kill-nth-thread thread-position)
@@ -865,8 +865,9 @@
          (repl-results (make-output-stream-for-target connection
                                                       :repl-result)))
     (when (eq (connection.communication-style connection) :spawn)
-      (spawn (lambda () (auto-flush-loop out))
-             :name "auto-flush-thread"))
+      (setf (connection.auto-flush-thread connection)
+            (spawn (lambda () (auto-flush-loop out))
+                   :name "auto-flush-thread")))
     (values dedicated-output in out io repl-results)))
 
 ;; FIXME: if wait-for-event aborts the event will stay in the queue forever.
@@ -1197,7 +1198,8 @@
 (defun cleanup-connection-threads (connection)
   (let ((threads (list (connection.repl-thread connection)
                        (connection.reader-thread connection)
-                       (connection.control-thread connection))))
+                       (connection.control-thread connection)
+                       (connection.auto-flush-thread connection))))
     (dolist (thread threads)
       (when (and thread 
                  (thread-alive-p thread)





More information about the slime-cvs mailing list