From 0e4937096bbdfcefe1b8e4baecd645c34279fa7d Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Tue, 3 Nov 2020 22:49:15 -0800 Subject: [PATCH] EventLoop::new: Use level-triggered events for inotify fd. The `inotify` crate's `Inotify::read_events` method does not read all available events from inotify (see hannobraun/inotify#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. --- src/inotify.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inotify.rs b/src/inotify.rs index 14e59e3a..05c96583 100644 --- a/src/inotify.rs +++ b/src/inotify.rs @@ -108,7 +108,7 @@ impl EventLoop { &evented_inotify, INOTIFY, mio::Ready::readable(), - mio::PollOpt::edge(), + mio::PollOpt::level(), )?; let event_loop = EventLoop {