Use a separate fiber to send pool stats

As the requester might timeout.
This commit is contained in:
Christopher Baines 2024-05-02 20:41:04 +01:00
parent 957727c51a
commit f4be647610

View file

@ -244,13 +244,15 @@
(waiters . ,(length waiters)) (waiters . ,(length waiters))
(checkout-failure-count . ,checkout-failure-count)))) (checkout-failure-count . ,checkout-failure-count))))
(spawn-fiber
(lambda ()
(perform-operation (perform-operation
(choice-operation (choice-operation
(wrap-operation (wrap-operation
(put-operation reply stats) (put-operation reply stats)
(const #t)) (const #t))
(wrap-operation (sleep-operation 0.2) (wrap-operation (sleep-operation 1)
(const #f))))) (const #f)))))))
(loop resources (loop resources
available available