From e566eeecc207b74696b923e8cc6b975db4b22172 Mon Sep 17 00:00:00 2001 From: Rob Hanlon Date: Thu, 17 Dec 2020 15:35:01 -0800 Subject: [PATCH] Ensure that the watcher thread is a daemon thread Calling `.setDaemon` with `true` on the watcher thread allows the JVM to exit even if the thread is still active, so it doesn't have to be explicitly shut down on process exit. --- src/main/clojure/hawk/core.clj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/clojure/hawk/core.clj b/src/main/clojure/hawk/core.clj index 5d2b6d3..b90e6bd 100644 --- a/src/main/clojure/hawk/core.clj +++ b/src/main/clojure/hawk/core.clj @@ -88,6 +88,7 @@ (empty? (mapv handler* (watcher/take! watcher))) (recur)))) + (.setDaemon true) .start) :watcher watcher}))