diff options
-rwxr-xr-x | python2/pyinotify.py | 4 | ||||
-rwxr-xr-x | python3/pyinotify.py | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/python2/pyinotify.py b/python2/pyinotify.py index dd8f637..5d07654 100755 --- a/python2/pyinotify.py +++ b/python2/pyinotify.py @@ -1632,6 +1632,10 @@ class AsyncioNotifier(Notifier): threshold, timeout) loop.add_reader(self._fd, self.handle_read) + def stop(self): + self.loop.remove_reader(self._fd) + Notifier.stop(self) + def handle_read(self, *args, **kwargs): self.read_events() self.process_events() diff --git a/python3/pyinotify.py b/python3/pyinotify.py index f4e76e5..576ec52 100755 --- a/python3/pyinotify.py +++ b/python3/pyinotify.py @@ -1622,6 +1622,10 @@ class AsyncioNotifier(Notifier): threshold, timeout) loop.add_reader(self._fd, self.handle_read) + def stop(self): + self.loop.remove_reader(self._fd) + Notifier.stop(self) + def handle_read(self, *args, **kwargs): self.read_events() self.process_events() |