-
Notifications
You must be signed in to change notification settings - Fork 121
Notify about missed event on Windows, MacOs & Linux. #197
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
Conversation
|
Hi @ed-sat!
Just FYI: you can handle the default buffer size used in efsw with the namespace Options {
enum Option {
/// For Windows, the default buffer size of 63*1024 bytes sometimes is not enough and
/// file system events may be dropped. For that, using a different (bigger) buffer size
/// can be defined here, but note that this does not work for network drives,
/// because a buffer larger than 64K will fail the folder being watched, see
/// http://msdn.microsoft.com/en-us/library/windows/desktop/aa365465(v=vs.85).aspx)
WinBufferSize = 1,As for the PR I'm a little undecided to merge it, it's an small API change and does not affect compilation on the C++ side, but still is a change, what I don't like is that the event is exclusive for a particular Windows event, I think I would like something more generic to communicate state changes otherwise will complicate the C bindings. Also, as a nit, any API/ABI change must also have its C bindings counterpart implemented and this change would require to modify the |
That would be great, in that case I think it's justified if macOS and Linux
If the above case is true, adding an extra parameter seems to be justified, allowing to pass This will be an ABI break but I might take advantage of the situation to change the major version and change a couple of extra things about the API/ABI. |
|
|
@ed-sat I think you forgot to post the comment, you just quoted my comment. |
92000f5 to
b8349d8
Compare
Sorry I wrote my part with quoted your comment. I updated PR with notification on MacOS & Linux |
|
Should I extend C-Bindings API for missing file actions? Or this part you will implement by yourself? |
I will add it later, thanks for your collaboration! |
Hi. We use your library for monitoring changes in our repository on different OS.
And we noticed that in some situation Windows OS loses file events due to buffer overflowed. In this situation client should resync file tree manually. So I added listener notification to inform client about missing file actions.
For information: chromium code do it in the same way
https://source.chromium.org/chromium/chromium/src/+/main:content/browser/file_system_access/file_path_watcher/file_path_watcher_win.cc;l=485;drc=8d1bf30bd5eccfc602479995ba9e7d886c93d1b5;bpv=0;bpt=1
https://source.chromium.org/chromium/chromium/src/+/main:content/browser/file_system_access/file_path_watcher/file_path_watcher_win.cc;drc=8d1bf30bd5eccfc602479995ba9e7d886c93d1b5;bpv=0;bpt=1;l=563