From 9d65b5c1558e2f34011abc28a2a055c8319984d8 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Thu, 28 Feb 2019 08:25:39 -0500 Subject: [PATCH] Get back to the reactor thread sooner --- src/allmydata/watchdog/inotify.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/allmydata/watchdog/inotify.py b/src/allmydata/watchdog/inotify.py index b28b9d1f4..eaa74c95f 100644 --- a/src/allmydata/watchdog/inotify.py +++ b/src/allmydata/watchdog/inotify.py @@ -132,15 +132,14 @@ class INotifyEventHandler(FileSystemEventHandler): # ignore events for parent directory return - reactor.callFromThread( - preserve_context(self._maybe_notify), - event_filepath_u, - event, - ) + self._maybe_notify(event_filepath_u, event) def on_any_event(self, event): with ANY_INOTIFY_EVENT(path=event.src_path, event=event): - self.process(event) + reactor.callFromThread( + preserve_context(self.process), + event, + ) class INotify(PollMixin):