Skip to content

Commit

Permalink
adding back the startAsDaemon function
Browse files Browse the repository at this point in the history
  • Loading branch information
pfranza committed Sep 18, 2024
1 parent 337e2e5 commit 17b1eaf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/net/ftlines/css/scoper/Watcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,4 +269,13 @@ private static boolean isChildPath(Path parent, Path child) {
return child.toAbsolutePath().startsWith(parent.toAbsolutePath());
}


public static void startAsDaemon(Path inputRoot, Path outputRootPath, Function<Path, Boolean> isWatchableFunction,
Function<Path, Boolean> isFullRebuildTrigger, Function<Path, Boolean> isRebuildFunction, Consumer<Phase> phaseChangeFunction, Consumer<Path> processingFunction) throws Exception {
Thread watcher = new Thread(new Watcher(inputRoot, outputRootPath, isWatchableFunction, isFullRebuildTrigger,
isRebuildFunction, phaseChangeFunction, processingFunction));
watcher.setDaemon(true);
watcher.start();
}

}

0 comments on commit 17b1eaf

Please sign in to comment.