(format t "~&creation test done~%")
-;; watch out for *current-thread* being the parent thread after exit
-(let* (sap
- (thread (sb-thread:make-thread
- (lambda ()
- (setq sap (thread-sap-for-id
- (thread-os-thread *current-thread*)))))))
- (wait-for-threads (list thread))
- (assert (null (symbol-value-in-thread 'sb-thread:*current-thread*
- sap))))
-
;; interrupt handlers are per-thread with pthreads, make sure the
;; handler installed in one thread is global
(sb-thread:make-thread
(lambda ()
(sb-ext:run-program "sleep" '("1") :search t :wait nil)))
-(with-test (:name (:thread-start :dynamic-values-and-gc))
- (let ((gc-thread (sb-thread:make-thread (lambda ()
- (loop (sleep (random 0.2))
- (sb-ext:gc :full t))))))
- (wait-for-threads
- (loop for i below 3000
- when (zerop (mod i 30))
- do (princ ".")
- collect
- (let ((*x* (lambda ())))
- (declare (special *x*))
- (sb-thread:make-thread (lambda () (functionp *x*))))))
- (sb-thread:terminate-thread gc-thread)
- (terpri)))
-
#| ;; a cll post from eric marsden
| (defun crash ()
| (setq *debugger-hook*