1 (in-package :sb-concurrency-test)
6 (defparameter +timeout+ 60.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 (sb-sys:with-deadline (:seconds timeout)
14 (join-thread thread :default :aborted)))
17 (join-thread *current-thread*))
19 (defun kill-thread (thread)
20 (when (thread-alive-p thread)
22 (terminate-thread thread))))
24 ) ;; #+sb-thread (progn ...