From a3daf9f7288bfe064e4df644423234e833b8e1a6 Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sat, 21 Jul 2012 18:46:56 +0900 Subject: [PATCH] don't check for a timeout on thread-join! unless one was specified --- lib/srfi/18/interface.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/srfi/18/interface.scm b/lib/srfi/18/interface.scm index 31d10840..d7fef274 100644 --- a/lib/srfi/18/interface.scm +++ b/lib/srfi/18/interface.scm @@ -14,12 +14,12 @@ (define thread-yield! yield!) (define (thread-join! thread . o) - (let ((timeout (if (pair? o) (car o) #f))) + (let ((timeout (and (pair? o) (car o)))) (cond ((%thread-join! thread (timeout->seconds timeout))) (else (thread-yield!) - (if (thread-timeout?) + (if (and timeout (thread-timeout?)) (if (and (pair? o) (pair? (cdr o))) (cadr o) (error "timed out waiting for thread" thread))