-
Notifications
You must be signed in to change notification settings - Fork 460
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
Clean shutdown of DirPoll when file processing is in progress #38
Conversation
@ar Please hold. I'm checking why CI failed. |
@ar I've changed a test. Please review and let me know if that causes any issues |
Vishnu, Thanks for the PR, but this PR has a merge that could have been rebased, and I'm afraid we'd loose history. In addition, there's a lot of whitespace changes that I'd appreciate if we could make place it in a separate PR or at least a separate commit, it's difficult to tell apart whitespace changes versus the real changed code. Can you rebase master and re-apply just the DirPoll code fix and its test ? |
Forget my comment, I can fix this locally. |
@ar Thank you. My editor put in some whitespace changes and I tried to revert all the whitespace changes with another commit. Sorry for the multiple commits. The changes may be easier to see if you look at https://github.com/jpos/jPOS/pull/38/files. |
Exactly, and they installed cleanly when I pulled the pr locally. Sorry for my initial concern, thought a lot more things were changed. |
Thanks Alejandro. My over-enthusiasm let to the multiple commits which is not really good. I'm still learning :) |
DirPollAdaptor does not wait for the dirPoll thread to finish during shutdown. This can cause a dirty shutdown if the dirPoll thread were in the midst of processing a file.
This change makes the shutdown wait for the dirPoll thread to exit in a graceful manner to good extent and then interrupts the thread if still running