Add more exception handling to make-resource-pool

As I'm not sure it's working reliably.
This commit is contained in:
Christopher Baines 2023-11-17 12:32:14 +00:00
parent da2a405e8b
commit b2bf948a00

View file

@ -98,6 +98,15 @@
(let ((channel (make-channel)))
(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 ()
(let loop ((resources '())
(available '())
@ -186,7 +195,8 @@
unknown)
(loop resources
available
waiters))))))
waiters)))))
#:unwind? #t))))
channel))