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

EventLoop::new: Use level-triggered events for inotify fd. #268

Merged
merged 1 commit into from
Nov 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
- CHANGE: Remove `Sender`s from watcher API in favour of `EventFn` [#214]
- META: The project maintainers have changed from @passcod to notify-rs.
- CHANGE: Avoid stating the watched path for non-recursive watches with inotify [#256]
- FIX: Report events promptly on Linux, even when many occur in rapid succession. [#268]

[#268]: https://github.com/notify-rs/notify/pull/268

## 5.0.0-pre.4 (2020-10-31)

Expand Down
5 changes: 4 additions & 1 deletion src/inotify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ impl EventLoop {
&evented_inotify,
INOTIFY,
mio::Ready::readable(),
mio::PollOpt::edge(),
// Use level-sensitive polling (issue #267): `Inotify::read_events`
// only consumes one buffer's worth of events at a time, so events
// may remain in the inotify fd after calling handle_inotify.
mio::PollOpt::level(),
jimblandy marked this conversation as resolved.
Show resolved Hide resolved
)?;

let event_loop = EventLoop {
Expand Down