I started to think about how Clojure deliver to us not only a simpler way to deal with threads and asynchronous primitives from Java in general but also an easier way as well.
But all this can be undermined when one needs to handle the threads lifecycle.
Is there some kind of framework a la Stuart Sierra Components to help us with this? Something like a mini Erlang OTP framework for Clojure?
A sierra-style Component can certainly manage an Executor thread pool! Good practice.
As for the linked article… Very interesting! But isn’t it on quicksand? It requires coordination of all shutdown hooks. If your project involves any third-party stuff that might ever register a shutdown hook, coordination is impossible. Before your shutdown hooks have done their job, the tools they need might already have been dismantled.