Tweak timeouts in resource-pool-stats
This commit is contained in:
parent
fbbdc41f5c
commit
f0f1329461
1 changed files with 10 additions and 8 deletions
|
|
@ -453,7 +453,9 @@ available. Return the resource once PROC has returned."
|
|||
(put-operation pool `(stats ,reply))
|
||||
(const #t))
|
||||
(wrap-operation (sleep-operation timeout)
|
||||
(const #f))))
|
||||
(lambda _
|
||||
(raise-exception
|
||||
(make-resource-pool-timeout-error))))))
|
||||
|
||||
(let ((time-remaining
|
||||
(- timeout
|
||||
|
|
@ -461,13 +463,13 @@ available. Return the resource once PROC has returned."
|
|||
start-time)
|
||||
internal-time-units-per-second))))
|
||||
(if (> time-remaining 0)
|
||||
(let ((response
|
||||
(perform-operation
|
||||
(choice-operation
|
||||
(get-operation reply)
|
||||
(wrap-operation (sleep-operation time-remaining)
|
||||
(const #f))))))
|
||||
response)
|
||||
(perform-operation
|
||||
(choice-operation
|
||||
(get-operation reply)
|
||||
(wrap-operation (sleep-operation time-remaining)
|
||||
(lambda _
|
||||
(raise-exception
|
||||
(make-resource-pool-timeout-error))))))
|
||||
(raise-exception
|
||||
(make-resource-pool-timeout-error))))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue