-
Notifications
You must be signed in to change notification settings - Fork 71
#563 Added alternative implementation with WatcherService wrapper #569
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
base: develop
Are you sure you want to change the base?
#563 Added alternative implementation with WatcherService wrapper #569
Conversation
| */ | ||
| public class FileWatcher implements AutoCloseable { | ||
| // in ms | ||
| private static final int TIMEOUT = 100; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not rename TIMEOUT_MS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And possibly pass the timeout on construction?
|
code looks good. I tried the PR that is merged, removes my direct delay and uses the existing waitForFile This does not work. The testcase creates the PWM and immediately call ON. The On cannot access the file open of the period, fails access Maybe the waitForFile File.access returns OK (0) before the file is fully created. I will try this code next. |
taartspi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good. I tried the PR that is merged, removes my direct delay and uses the existing waitForFile This does not work. The testcase creates the PWM and immediately call ON. The On cannot access the file open of the period, fails access Maybe the waitForFile File.access returns OK (0) before the file is fully created. I will try this code next.
Basic implementation of NIO2 wrapper for file creation waiting with fixed timeout.