How to do graceful shutdown?
kkalavantavanich opened this issue · 5 comments
kkalavantavanich commented
How can I do graceful shutdown using this library? Say I have some code that is doing retry on some HTTP call. Then the application starts shutting down. Can I somehow register that this should be gracefully shut down?
adamw commented
kkalavantavanich commented
Do you mean as a wrapper around retry
or retry
as a wrapper around those mechanisms?
adamw commented
a wrapper around retry. Something like allocateResource.flatMap(r => retry(useResource(r)).onComplete(releaseResource(r)))
adamw commented
assuming we're working with Future
s
kkalavantavanich commented
I see. That sounds reasonable. Thanks 🙏 .