Add more exception handling to make-resource-pool
As I'm not sure it's working reliably.
This commit is contained in:
parent
da2a405e8b
commit
b2bf948a00
1 changed files with 92 additions and 82 deletions
|
|
@ -98,6 +98,15 @@
|
||||||
|
|
||||||
(let ((channel (make-channel)))
|
(let ((channel (make-channel)))
|
||||||
(spawn-fiber
|
(spawn-fiber
|
||||||
|
(lambda ()
|
||||||
|
(while #t
|
||||||
|
(with-exception-handler
|
||||||
|
(lambda (exn)
|
||||||
|
(simple-format
|
||||||
|
(current-error-port)
|
||||||
|
"exception in the ~A pool fiber: ~A\n"
|
||||||
|
name
|
||||||
|
exn))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let loop ((resources '())
|
(let loop ((resources '())
|
||||||
(available '())
|
(available '())
|
||||||
|
|
@ -186,7 +195,8 @@
|
||||||
unknown)
|
unknown)
|
||||||
(loop resources
|
(loop resources
|
||||||
available
|
available
|
||||||
waiters))))))
|
waiters)))))
|
||||||
|
#:unwind? #t))))
|
||||||
|
|
||||||
channel))
|
channel))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue