def loop(self):
        # When the loop must be terminated .stop() is called, 'stop'
        # is written to pipe fd so poll() returns and .check_events()
        # returns False which make evaluate the While's stop condition
        # ._stop_event.isSet() wich put an end to the thread's execution.
        while not self._stop_event.isSet():
            self.process_events()
            ref_time = time.time()
            if self.check_events():
                self._sleep(ref_time)
                self.read_events()
Thread's main loop. Don't meant to be called by user directly.
dataset/ETHPy150Open seb-m/pyinotify/python2/pyinotify.py/ThreadedNotifier.loop