1 (in-package :sb-concurrency-test)
6 (defparameter +timeout+ 30.0)
8 (defun make-threads (n name fn)
9 (loop for i from 1 to n
10 collect (make-thread fn :name (format nil "~A-~D" name i))))
12 (defun timed-join-thread (thread &optional (timeout +timeout+))
13 (handler-case (sb-sys:with-deadline (:seconds timeout)
14 (join-thread thread :default :aborted))
19 (join-thread *current-thread*))
21 (defun kill-thread (thread)
22 (when (thread-alive-p thread)
24 (terminate-thread thread))))
26 ) ;; #+sb-thread (progn ...