Fix a bug with resource pool idle checking
The fiber would never finish.
This commit is contained in:
parent
95200eccfd
commit
d07e309566
1 changed files with 10 additions and 3 deletions
|
|
@ -1178,9 +1178,16 @@
|
||||||
(when idle-seconds
|
(when idle-seconds
|
||||||
(spawn-fiber
|
(spawn-fiber
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(while #t
|
(let loop ()
|
||||||
(sleep idle-seconds)
|
(put-message channel '(check-for-idle-resources))
|
||||||
(put-message channel '(check-for-idle-resources))))))
|
(when (choice-operation
|
||||||
|
(wrap-operation
|
||||||
|
(sleep-operation idle-seconds)
|
||||||
|
(const #t))
|
||||||
|
(wrap-operation
|
||||||
|
(wait-operation destroy-condition)
|
||||||
|
(const #f)))
|
||||||
|
(loop))))))
|
||||||
|
|
||||||
(with-exception-handler
|
(with-exception-handler
|
||||||
(lambda (exn)
|
(lambda (exn)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue