Fuller error message in PACK-WIRED-TN
[sbcl.git] / tests / clos-interrupts.impure.lisp
index 6195449..8d7ec67 100644 (file)
           (*interrupting* t))
       ;; Test both interrupting yourself and using another thread
       ;; for to interrupting.
-      (write-line "interrupt-1")
-      (sb-thread:join-thread (sb-thread:make-thread
-                              (lambda ()
-                                (sb-thread:interrupt-thread
-                                 self
-                                 (lambda ()
-                                   (compute-test 1 2))))))
-      (write-line "interrupt-2")
+      #+sb-thread
+      (progn
+        (write-line "/interrupt-other")
+        (sb-thread:join-thread (sb-thread:make-thread
+                                (lambda ()
+                                  (sb-thread:interrupt-thread
+                                   self
+                                   (lambda ()
+                                     (compute-test 1 2)))))))
+      (write-line "/interrupt-self")
       (sb-thread:interrupt-thread self (lambda () (compute-test 1 2))))))
 
 (defvar *interrupted-gfs* nil)
@@ -75,7 +77,9 @@
 (defmethod compute-test ((x symbol) (y symbol))
   'symbol)
 
-(compute-test 1 2)
+(test-util:with-test (:name :compute-test
+                            :fails-on (and :win32 (not :sb-thread)))
+  (compute-test 1 2)
 
-;;; Check that we actually interrupted something.
-(assert (equal (list #'compute-test) *interrupted-gfs*))
+  ;; Check that we actually interrupted something.
+  (assert (equal (list #'compute-test) *interrupted-gfs*)))