[slime-cvs] CVS slime
CVS User heller
heller at common-lisp.net
Wed Apr 14 17:51:38 UTC 2010
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv9817
Modified Files:
ChangeLog swank.lisp
Log Message:
Handle errors during interrupt processing with SLDB.
Bugfix for http://article.gmane.org/gmane.lisp.slime.devel/9641
* swank.lisp (invoke-or-queue-interrupt): When the queue is full,
process the interrupt immediately and also handle
SERIOUS-CONDITIONs during interrupt processing in SLDB. SLDB
should work more likely than the interrupted code is expected to
handle the condition.
(with-interrupts-enabled%): Don't check for interrupts when
toggling interrupts off.
(wait-for-event): Add docstring.
--- /project/slime/cvsroot/slime/ChangeLog 2010/04/14 17:51:30 1.2062
+++ /project/slime/cvsroot/slime/ChangeLog 2010/04/14 17:51:38 1.2063
@@ -1,5 +1,19 @@
2010-04-14 Helmut Eller <heller at common-lisp.net>
+ Handle errors during interrupt processing with SLDB.
+ Bugfix for http://article.gmane.org/gmane.lisp.slime.devel/9641
+
+ * swank.lisp (invoke-or-queue-interrupt): When the queue is full,
+ process the interrupt immediately and also handle
+ SERIOUS-CONDITIONs during interrupt processing in SLDB. SLDB
+ should work more likely than the interrupted code is expected to
+ handle the condition.
+ (with-interrupts-enabled%): Don't check for interrupts when
+ toggling interrupts off.
+ (wait-for-event): Add docstring.
+
+2010-04-14 Helmut Eller <heller at common-lisp.net>
+
Move error handling and logging from swank-rpc.lisp to swank.lisp
* swank.lisp (log-event, destructure-case, decode-message)
--- /project/slime/cvsroot/slime/swank.lisp 2010/04/14 17:51:30 1.708
+++ /project/slime/cvsroot/slime/swank.lisp 2010/04/14 17:51:38 1.709
@@ -525,11 +525,11 @@
(defmacro with-interrupts-enabled% (flag body)
`(progn
- (check-slime-interrupts)
+ ,@(if flag '((check-slime-interrupts)))
(multiple-value-prog1
(let ((*slime-interrupts-enabled* ,flag))
, at body)
- (check-slime-interrupts))))
+ ,@(if flag '((check-slime-interrupts))))))
(defmacro with-slime-interrupts (&body body)
`(with-interrupts-enabled% t ,body))
@@ -551,9 +551,11 @@
(list function)))
(cond ((cdr *pending-slime-interrupts*)
(log-event "too many queued interrupts~%")
- (check-slime-interrupts))
+ (with-simple-restart (continue "Continue from interrupt")
+ (handler-bind ((serious-condition #'invoke-slime-debugger))
+ (check-slime-interrupts))))
(t
- (log-event "queue-interrupt: ~a" function)
+ (log-event "queue-interrupt: ~a~%" function)
(when *interrupt-queued-handler*
(funcall *interrupt-queued-handler*)))))))
@@ -1261,6 +1263,11 @@
(t (dispatch-event event))))
(defun wait-for-event (pattern &optional timeout)
+ "Scan the event queue for PATTERN and return the event.
+If TIMEOUT is 'nil wait until a matching event is enqued.
+If TIMEOUT is 't only scan the queue without waiting.
+The second return value is t if the timeout expired before a matching
+event was found."
(log-event "wait-for-event: ~s ~s~%" pattern timeout)
(without-slime-interrupts
(cond ((use-threads-p)
More information about the slime-cvs
mailing list