From 682b7487bec22dd9a2994d9de4307a1c4418bb78 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Fri, 4 May 2007 09:21:40 +0000 Subject: [PATCH] 1.0.5.29: fix a race-condition in deadline.impure.lisp * The thread that is supposed to hold the mutex might no yet have grabbed it. --- tests/deadline.impure.lisp | 9 +++++++-- version.lisp-expr | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/deadline.impure.lisp b/tests/deadline.impure.lisp index 32d19f63d..9d0b4f979 100644 --- a/tests/deadline.impure.lisp +++ b/tests/deadline.impure.lisp @@ -15,8 +15,13 @@ #+(and sb-thread (not sb-lutex)) (progn (assert-timeout - (let ((lock (sb-thread:make-mutex))) - (sb-thread:make-thread (lambda () (sb-thread:get-mutex lock) (sleep 5))) + (let ((lock (sb-thread:make-mutex)) + (waitp t)) + (sb-thread:make-thread (lambda () + (sb-thread:get-mutex lock) + (setf waitp nil) + (sleep 5))) + (loop while waitp do (sleep 0.01)) (sb-impl::with-deadline (:seconds 1) (sb-thread:get-mutex lock)))) diff --git a/version.lisp-expr b/version.lisp-expr index 3c913a2ea..879aca949 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.5.28" +"1.0.5.29" -- 2.11.4.GIT