Skip to content

Ordered shutdown hooks for dependent threadpools #46

Open
@mourjo

Description

@mourjo

Hi! I wanted to ask, do you think it would be a good idea to have a lifecycle manager (a shutdown hook) for multiple claypoole threadpools for when the JVM gets a kill signal? Something like if threadpool t1 uses another threadpool t2, then at the JVM shutdown, we would want the threadpool t2 to shutdown first in order for t1 to be gracefully shut down without having tasks rejected? We could have one shutdown hook for all claypoole threads in a JVM and based on the dependency (which I guess needs to be mentioned at the time of creation of the pool), it could coordinate shutting down of the different pools. Do you think this would be something worth having in this project? I could start a pull request then. Wanted to get your opinion first.

https://clojureverse.org/t/is-there-a-canonical-way-or-framework-to-handle-threads-lifecycle/6136

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions