[slime-cvs] CVS slime
CVS User heller
heller at common-lisp.net
Sun Dec 16 13:38:21 UTC 2012
Update of /project/slime/cvsroot/slime
In directory tiger.common-lisp.net:/tmp/cvs-serv8399
Modified Files:
ChangeLog swank.lisp
Log Message:
* swank.lisp (thread-for-evaluation): Make generic. Remove keyword
arg. Don't call find-repl-thread.
--- /project/slime/cvsroot/slime/ChangeLog 2012/12/16 13:38:07 1.2374
+++ /project/slime/cvsroot/slime/ChangeLog 2012/12/16 13:38:21 1.2375
@@ -1,5 +1,10 @@
2012-12-16 Helmut Eller <heller at common-lisp.net>
+ * swank.lisp (thread-for-evaluation): Make generic. Remove keyword
+ arg. Don't call find-repl-thread.
+
+2012-12-16 Helmut Eller <heller at common-lisp.net>
+
* slime.el (slime-attempt-connection): Show the attempt counter.
2012-12-03 Stas Boukarev <stassats at gmail.com>
--- /project/slime/cvsroot/slime/swank.lisp 2012/11/13 15:44:40 1.798
+++ /project/slime/cvsroot/slime/swank.lisp 2012/12/16 13:38:21 1.799
@@ -997,26 +997,21 @@
(force-output stream)
(sleep *auto-flush-interval*)))
-;; FIXME: drop dependency on find-repl-thread
-(defun thread-for-evaluation (connection id &key find-existing)
- "Find or create a thread to evaluate the next request."
- (etypecase id
- ((member t)
- (etypecase connection
- (multithreaded-connection
- (if find-existing
- (or (car (mconn.active-threads connection))
- (find-repl-thread connection))
- (spawn-worker-thread connection)))
- (singlethreaded-connection (current-thread))))
- ((member :repl-thread)
- (find-repl-thread connection))
- (fixnum
- (find-thread id))))
+(defgeneric thread-for-evaluation (connection id)
+ (:documentation "Find or create a thread to evaluate the next request.")
+ (:method ((connection multithreaded-connection) (id (eql t)))
+ (spawn-worker-thread connection))
+ (:method ((connection multithreaded-connection) (id (eql :find-existing)))
+ (car (mconn.active-threads connection)))
+ (:method (connection (id fixnum))
+ (find-thread id))
+ (:method ((connection singlethreaded-connection) id)
+ (current-thread)))
(defun interrupt-worker-thread (connection id)
- (let ((thread (thread-for-evaluation connection id
- :find-existing t)))
+ (let ((thread (thread-for-evaluation connection
+ (cond ((eq id t) :find-existing)
+ (t id)))))
(log-event "interrupt-worker-thread: ~a ~a~%" id thread)
(if thread
(etypecase connection
More information about the slime-cvs
mailing list