cc-4269: added coalesce_events option like in mm1

This commit is contained in:
Rudi Grinberg 2012-08-27 15:53:19 -04:00
parent 3f0df6d101
commit d5ccf183a0
1 changed files with 3 additions and 4 deletions

View File

@ -219,14 +219,13 @@ class Manager(Loggable):
self.logger.info("'%s' is not being watched, hence cannot be \
removed" % watch_dir)
def pyinotify(self):
return pyinotify.Notifier(self.wm)
def loop(self):
"""
block until we receive pyinotify events
"""
pyinotify.Notifier(self.wm).loop()
notifier = pyinotify.Notifier(self.wm)
notifier.coalesce_events()
notifier.loop()
# Experiments with running notifier in different modes
# There are 3 options: normal, async, threaded.
#import asyncore