sksamuel / hoplite

A boilerplate-free Kotlin config library for loading configuration files as data classes
Apache License 2.0
922 stars 74 forks source link

FileWatcher threads pool prevent app from shutdown #387

Closed jakubzieba closed 1 year ago

jakubzieba commented 1 year ago

Thread pool created in FileWatcher https://github.com/sksamuel/hoplite/blob/master/hoplite-watch/src/main/kotlin/com/sksamuel/hoplite/watch/watchers/file.kt#L30 prevent app from shutdown. Threads in pool should be set as deamon or FileWatcher should have function like stop or destroy.

sksamuel commented 1 year ago

Thanks for bug report. I've set the file watcher to use daemon threads for the next release and will release a patch version of 2.7.x