New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run the watcher? #25
Comments
|
Yes. Non-blocking is a good thing for a file monitor ;-). But how can I run my program then? Let's just assume that it should not do anything else than printing the events ... |
The Scala implicit val ec: ExecutionContext =
ExecutionContext.fromExecutorService(Executors.newFixedThreadPool(8)) Hard to suggest specifics about thread pools without knowing the kind of work you're doing, but the bottom line is you need some regular non-daemon threads running so the JVM doesn't exit. |
I am trying to run the watcher in Scala. But even though I am calling
watcher.start()
(which i expect to run forever), the program finishes immediately. What am I doing wrong?The text was updated successfully, but these errors were encountered: