mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-09 14:07:34 +02:00
don't check for a timeout on thread-join! unless one was specified
This commit is contained in:
parent
fd87e62ec0
commit
a3daf9f728
1 changed files with 2 additions and 2 deletions
|
@ -14,12 +14,12 @@
|
||||||
(define thread-yield! yield!)
|
(define thread-yield! yield!)
|
||||||
|
|
||||||
(define (thread-join! thread . o)
|
(define (thread-join! thread . o)
|
||||||
(let ((timeout (if (pair? o) (car o) #f)))
|
(let ((timeout (and (pair? o) (car o))))
|
||||||
(cond
|
(cond
|
||||||
((%thread-join! thread (timeout->seconds timeout)))
|
((%thread-join! thread (timeout->seconds timeout)))
|
||||||
(else
|
(else
|
||||||
(thread-yield!)
|
(thread-yield!)
|
||||||
(if (thread-timeout?)
|
(if (and timeout (thread-timeout?))
|
||||||
(if (and (pair? o) (pair? (cdr o)))
|
(if (and (pair? o) (pair? (cdr o)))
|
||||||
(cadr o)
|
(cadr o)
|
||||||
(error "timed out waiting for thread" thread))
|
(error "timed out waiting for thread" thread))
|
||||||
|
|
Loading…
Add table
Reference in a new issue