Skip to content
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

Use ReadDirectoryChangesW instead of ChangeNotify on Win32 (Windows 10 onwards) #28

Open
Corion opened this issue Oct 1, 2022 · 4 comments

Comments

@Corion
Copy link

Corion commented Oct 1, 2022

Thank you for writing Filesys::Notify::Simple!

I recently wrote Filesys::Notify::Win32::ReadDirectoryChanges for a different tool, but I think it would improve the resource usage of Filesys::Notify::Simple. It uses the ReadDirectoryChangesW API , which allows waiting for arbitrarily many directories instead of a limit of 64 objects.

My approach has different prerequisites than the approach using Win32::ChangeNotify:

  • threads
  • Win32::API
  • Encode
  • Windows 10 onwards

If you are interested, I will release Filesys::Notify::Win32::ReadDirectoryChanges and create a pull request that adds it as one step before loading Win32::ChangeNotify. If you think there should be API changes made to my module, please also tell me, ideally before I release it onto CPAN :)

@miyagawa
Copy link
Owner

miyagawa commented Oct 1, 2022

sounds reasonable to me! PR welcome.

@Corion
Copy link
Author

Corion commented Oct 3, 2022

Thanks for merging this!

I made a mistake in adding Cygwin support. F:N:W:ReadDirectoryChanges doesn't work on Cygwin (yet) and won't install there. I will either find a fix for that or amend the PR so that the (wrong, if harmless) Cygwin lines are removed.

@miyagawa
Copy link
Owner

miyagawa commented Oct 3, 2022

@Corion can you update the POD documentation to mention your module as well? There's a whole section about win32 compatibility that needs updating.

@Corion
Copy link
Author

Corion commented Oct 3, 2022

Yes, I will update that part as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants