Index: srfi-18.scm =================================================================== --- srfi-18.scm (Revision 11974) +++ srfi-18.scm (Arbeitskopie) @@ -239,8 +239,11 @@ ct 1 (lambda () (case (##sys#slot thread 3) - [(dead) (apply return (##sys#slot thread 2))] + [(dead) + (##sys#remove-from-timeout-list! ct) + (apply return (##sys#slot thread 2))] [(terminated) + (##sys#remove-from-timeout-list! ct) (return (##sys#signal (##sys#make-structure @@ -362,6 +365,8 @@ (##sys#setslot mutex 3 (##sys#delq ct (##sys#slot mutex 3))) (##sys#setslot ##sys#current-thread 8 (cons mutex (##sys#slot ##sys#current-thread 8))) (##sys#setslot mutex 2 thread) + (if (not (##sys#slot ct 13)) ; not unblocked by timeout + (##sys#remove-from-timeout-list! ct)) #f) ) (##sys#thread-block-for-timeout! ct limit) (switch) ] @@ -394,6 +399,8 @@ ct 1 (lambda () (##sys#setslot cvar 2 (##sys#delq ct (##sys#slot cvar 2))) + (if (not (##sys#slot ct 13)) ; not unblocked by timeout + (##sys#remove-from-timeout-list! ct)) (return #f) ) ) (##sys#thread-block-for-timeout! ct limit) ] [else