[slime-cvs] CVS slime

CVS User trittweiler trittweiler at common-lisp.net
Thu Mar 11 09:05:50 UTC 2010


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

Modified Files:
	ChangeLog swank.lisp 
Log Message:
	* swank.lisp (signal-interrupt): Removed.
	(interrupt-worker-thread): Slurp in definition of
	signal-interrupt. No need for invoke-or-queue-interrupt twice in
	case we do not use threads. Thus micro-prettification of
	backtraces.


--- /project/slime/cvsroot/slime/ChangeLog	2010/03/11 09:02:29	1.2034
+++ /project/slime/cvsroot/slime/ChangeLog	2010/03/11 09:05:50	1.2035
@@ -1,5 +1,13 @@
 2010-03-10  Tobias C. Rittweiler <tcr at freebits.de>
 
+	* swank.lisp (signal-interrupt): Removed.
+	(interrupt-worker-thread): Slurp in definition of
+	signal-interrupt. No need for invoke-or-queue-interrupt twice in
+	case we do not use threads. Thus micro-prettification of
+	backtraces.
+
+2010-03-10  Tobias C. Rittweiler <tcr at freebits.de>
+
 	* swank-ecl.lisp (source-location): Move call to
 	TRANSLATE-LOGICAL-PATHNAME from here into MAKE-FILE-LOCATION
 	because locations-via-annotations may now also involve logical
--- /project/slime/cvsroot/slime/swank.lisp	2010/03/08 11:57:04	1.698
+++ /project/slime/cvsroot/slime/swank.lisp	2010/03/11 09:05:50	1.699
@@ -1014,9 +1014,12 @@
                     (spawn (lambda ()) :name "ephemeral"))))
     (log-event "interrupt-worker-thread: ~a ~a~%" id thread)
     (assert thread)
-    (signal-interrupt thread
-                      (lambda ()
-                        (invoke-or-queue-interrupt #'simple-break)))))
+    (cond ((use-threads-p)
+           (interrupt-thread thread
+                             (lambda ()
+                               ;; safely interrupt THREAD
+                               (invoke-or-queue-interrupt #'simple-break))))
+          (t (simple-break)))))
 
 (defun thread-for-evaluation (id)
   "Find or create a thread to evaluate the next request."
@@ -1099,15 +1102,10 @@
 (defun send-to-emacs (event)
   "Send EVENT to Emacs."
   ;;(log-event "send-to-emacs: ~a" event)
-  (cond ((use-threads-p) 
+  (cond ((use-threads-p)
          (send (connection.control-thread *emacs-connection*) event))
         (t (dispatch-event event))))
 
-(defun signal-interrupt (thread interrupt)
-  (log-event "signal-interrupt [~a]: ~a ~a~%" (use-threads-p) thread interrupt)
-  (cond ((use-threads-p) (interrupt-thread thread interrupt))
-        (t (funcall interrupt))))
-
 (defun wait-for-event (pattern &optional timeout)
   (log-event "wait-for-event: ~s ~s~%" pattern timeout)
   (without-slime-interrupts
@@ -1217,8 +1215,8 @@
   (handle-requests connection t))
 
 (defun dispatch-interrupt-event (connection)
-  ;; This boils down to SIGNAL-INTERRUPT which uses USE-THREADS-P
-  ;; which needs *EMACS-CONNECTION*.
+  ;; This boils down to INTERRUPT-WORKER-THREAD which uses
+  ;; USE-THREADS-P which needs *EMACS-CONNECTION*.
   (with-connection (connection)
     (dispatch-event `(:emacs-interrupt ,(current-thread-id)))))
 





More information about the slime-cvs mailing list