Revert "fix sb-posix tests on OpenBSD"
[sbcl.git] / contrib / sb-concurrency / tests / test-utils.lisp
index 6a5e82a..a6e4414 100644 (file)
@@ -1,17 +1,30 @@
+;;;; -*-  Lisp -*-
+;;;;
+;;;; This software is part of the SBCL system. See the README file for
+;;;; more information.
+;;;;
+;;;; This software is derived from the CMU CL system, which was
+;;;; written at Carnegie Mellon University and released into the
+;;;; public domain. The software is in the public domain and is
+;;;; provided with absolutely no warranty. See the COPYING and CREDITS
+;;;; files for more information.
+
 (in-package :sb-concurrency-test)
 
 #+sb-thread
 (progn
 
-(defparameter +timeout+ 60.0)
+(defparameter +timeout+ 30.0)
 
 (defun make-threads (n name fn)
   (loop for i from 1 to n
         collect (make-thread fn :name (format nil "~A-~D" name i))))
 
 (defun timed-join-thread (thread &optional (timeout +timeout+))
-  (sb-sys:with-deadline (:seconds timeout)
-    (join-thread thread :default :aborted)))
+  (handler-case (sb-sys:with-deadline (:seconds timeout)
+                  (join-thread thread :default :aborted))
+    (sb-ext:timeout ()
+      :timeout)))
 
 (defun hang ()
   (join-thread *current-thread*))
@@ -21,4 +34,4 @@
     (ignore-errors
       (terminate-thread thread))))
 
-) ;; #+sb-thread (progn ...
\ No newline at end of file
+) ;; #+sb-thread (progn ...