-
Notifications
You must be signed in to change notification settings - Fork 225
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
EventLoop::new: Use level-triggered events for inotify fd. #268
Conversation
The solution looks reasonable to me. This may have a negative impact on performance but I think it's a trade-off. @notify-rs/watchmakers Any concerns? @jimblandy And this bugfix (i.e. behavior change) would be worth mentioning on the changelog, could you add an entry? |
Okay, great! Yes, I'll add a changelog entry. When the number of events is small enough to be handled by a single call to A more complex fix that minimizes Mio events would be to have |
0e49370
to
534c049
Compare
@JohnTitor Would it be worth backporting this to the last version (In fact, I've already backported it - the question is just whether the project wants it.) |
Makes sense, then there's no roadblock to merge!
I believe it's safe to backport, yes. If you want, I'm happy to accept it :) |
c5a1046
to
66a0a14
Compare
Filed as #269. |
The `inotify` crate's `Inotify::read_events` method does not read all available events from inotify (see hannobraun/inotify-rs#156), only one buffer's worth. Using level-triggered events tells Mio to report events on the inotify fd until all events have been read. Fixes notify-rs#267.
66a0a14
to
be04c3b
Compare
The
inotify
crate'sInotify::read_events
method does not read all availableevents from inotify (see hannobraun/inotify-rs#156), only one buffer's worth. Using
level-triggered events tells Mio to report events on the inotify fd until all
events have been read.
Fixes #267.