Skip to content

Conversation

@riberk
Copy link
Contributor

@riberk riberk commented Jul 16, 2025

INotifyWatcher hold inotify watch descriptors map wd -> path and after an unwatch call the descriptor is deleted from the map. In some cases, if a lot of events are raised, it may cause race condition when the descriptor has been deleted, but event with this descriptor has already been queued. In that case INotifyWatcher doesn't know the path and just ignore the event

fixes #678

riberk added 3 commits July 16, 2025 11:55
INotifyWatcher hold inotify watch descriptors map `wd -> path` and after an `unwatch` call  the descriptor is deleted from the map.
In some cases, if a lot of events are raised, it may cause race condition when the descriptor has been deleted, but event with
this descriptor has already been queued. In that case INotifyWatcher doesn't know the path and just ignore the event

fixes notify-rs#678
@riberk
Copy link
Contributor Author

riberk commented Jul 16, 2025

In this PR I also have moved inotify tests to separated child module with #[cfg(test)]

@dfaust
Copy link
Member

dfaust commented Jul 16, 2025

Thanks, @riberk. This looks very good. I can merge it now, or you can fix the typo first. Your call.

Co-authored-by: Daniel Faust <hessijames@mailbox.org>
@riberk
Copy link
Contributor Author

riberk commented Jul 16, 2025

or you can fix the typo first

Done, thanks for the fix

@dfaust dfaust merged commit e36d54e into notify-rs:main Jul 16, 2025
17 checks passed
@dfaust
Copy link
Member

dfaust commented Jul 16, 2025

Fantastic. Thanks again!

@dfaust
Copy link
Member

dfaust commented Jul 16, 2025

@riberk I think this would be a good time to make a new release - unless you are working on something else.

@riberk
Copy link
Contributor Author

riberk commented Jul 16, 2025

@dfaust it'd be good, but I don't know how I can help

@dfaust
Copy link
Member

dfaust commented Jul 16, 2025

I will make the release. Just wanted to make sure I don't release while you are still working on something.

I'll wait with the release until my latest MR is merged as well, though.

@riberk
Copy link
Contributor Author

riberk commented Jul 16, 2025

Ah, now I see it. Right now I'm not working on anything

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

Successfully merging this pull request may close these issues.

notify-debouncer-full panic on Linux with inotify

2 participants