Skip to content

Commit 02e2e17

Browse files
committedAug 6, 2023
Use daemon threads for FileWatcher #387
1 parent de97dc3 commit 02e2e17

File tree

1 file changed

+1
-1
lines changed
  • hoplite-watch/src/main/kotlin/com/sksamuel/hoplite/watch/watchers

1 file changed

+1
-1
lines changed
 

‎hoplite-watch/src/main/kotlin/com/sksamuel/hoplite/watch/watchers/file.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class FileWatcher(private val dir: String) : Watchable {
2727
StandardWatchEventKinds.ENTRY_DELETE
2828
)
2929

30-
Executors.newSingleThreadExecutor().submit {
30+
Executors.newSingleThreadExecutor { Thread(it).apply { isDaemon = true } }.submit {
3131
while (true) {
3232
try {
3333
val watchKey = watchService.take()

0 commit comments

Comments
 (0)