Skip to content

Commit

Permalink
EventLoop::new: Use level-triggered events for inotify fd.
Browse files Browse the repository at this point in the history
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 #267.
  • Loading branch information
jimblandy committed Nov 4, 2020
1 parent 84e7b0c commit 0e49370
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inotify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl EventLoop {
&evented_inotify,
INOTIFY,
mio::Ready::readable(),
mio::PollOpt::edge(),
mio::PollOpt::level(),
)?;

let event_loop = EventLoop {
Expand Down

0 comments on commit 0e49370

Please sign in to comment.