From ba534ac1b20426ce6ac673b993c427ea9180ac9c Mon Sep 17 00:00:00 2001 From: David Lichteblau Date: Sun, 30 Sep 2012 13:59:28 +0200 Subject: [PATCH] Try to make test :deferrables-unblocked-by-lock more robust - Use a join thread, not a kill thread, so that we do not kill the background thread while it is currently performing the actual test. - Give the thread more time to start up, to make it more likely that its GRAB-MUTEX call needs to wait -- otherwise deferrables would not be unblocked. --- tests/threads.impure.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/threads.impure.lisp b/tests/threads.impure.lisp index 196261d..cf9c676 100644 --- a/tests/threads.impure.lisp +++ b/tests/threads.impure.lisp @@ -86,7 +86,7 @@ (with-test (:name (:interrupt-thread :deferrables-unblocked-by-lock)) (let ((lock (sb-thread::make-mutex)) - (thread (make-kill-thread (lambda () + (thread (make-join-thread (lambda () (loop (sleep 1)))))) (sb-thread::grab-mutex lock) (sb-thread:interrupt-thread thread @@ -95,7 +95,7 @@ (sb-thread::grab-mutex lock) (check-deferrables-unblocked-or-lose 0) (sb-thread:abort-thread))) - (sleep 1) + (sleep 3) (sb-thread::release-mutex lock))) ;;; compare-and-swap -- 1.7.10.4