This commit is contained in:
parent
ec2f2489a2
commit
f4b48a1499
1 changed files with 25 additions and 3 deletions
|
@ -365,7 +365,11 @@
|
||||||
((reply . timeout)
|
((reply . timeout)
|
||||||
(if (and timeout
|
(if (and timeout
|
||||||
(< timeout current-internal-time))
|
(< timeout current-internal-time))
|
||||||
(waiter-loop (deq! waiters))
|
(if (q-empty? waiters)
|
||||||
|
(loop resources
|
||||||
|
(cons resource available)
|
||||||
|
waiters)
|
||||||
|
(waiter-loop (deq! waiters)))
|
||||||
(begin
|
(begin
|
||||||
(if timeout
|
(if timeout
|
||||||
(let ((reply-timeout
|
(let ((reply-timeout
|
||||||
|
@ -795,7 +799,13 @@
|
||||||
((reply . timeout)
|
((reply . timeout)
|
||||||
(if (and timeout
|
(if (and timeout
|
||||||
(< timeout current-internal-time))
|
(< timeout current-internal-time))
|
||||||
(waiter-loop (deq! waiters))
|
(if (q-empty? waiters)
|
||||||
|
(loop (cons resource resources)
|
||||||
|
(cons resource available)
|
||||||
|
waiters
|
||||||
|
(cons (get-internal-real-time)
|
||||||
|
resources-last-used))
|
||||||
|
(waiter-loop (deq! waiters)))
|
||||||
(begin
|
(begin
|
||||||
(if timeout
|
(if timeout
|
||||||
(let ((reply-timeout
|
(let ((reply-timeout
|
||||||
|
@ -938,7 +948,19 @@
|
||||||
((reply . timeout)
|
((reply . timeout)
|
||||||
(if (and timeout
|
(if (and timeout
|
||||||
(< timeout current-internal-time))
|
(< timeout current-internal-time))
|
||||||
(waiter-loop (deq! waiters))
|
(if (q-empty? waiters)
|
||||||
|
(loop resources
|
||||||
|
(cons resource available)
|
||||||
|
waiters
|
||||||
|
(begin
|
||||||
|
(list-set!
|
||||||
|
resources-last-used
|
||||||
|
(list-index (lambda (x)
|
||||||
|
(eq? x resource))
|
||||||
|
resources)
|
||||||
|
(get-internal-real-time))
|
||||||
|
resources-last-used))
|
||||||
|
(waiter-loop (deq! waiters)))
|
||||||
(begin
|
(begin
|
||||||
(if timeout
|
(if timeout
|
||||||
(let ((reply-timeout
|
(let ((reply-timeout
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue