summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Martini <root@mars.(none)>2008-07-28 09:14:25 +0200
committerSebastien Martini <root@mars.(none)>2008-07-28 09:14:25 +0200
commit8e300b46ed892704a4484e4734c7d9e2c7100877 (patch)
treebfad5035eed2f384b6a6428afc8a643bb0be746a
parentca5ddc5f5eea62c76b6be75a1fbdedf663dbcfd0 (diff)
downloadpyinotify-8e300b46ed892704a4484e4734c7d9e2c7100877.tar.gz
New attribute Notifier.event_queue_size
-rwxr-xr-xpyinotify.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pyinotify.py b/pyinotify.py
index b66a1a8..7939e83 100755
--- a/pyinotify.py
+++ b/pyinotify.py
@@ -884,6 +884,7 @@ class Notifier:
self._pollobj.register(self._fd, select.POLLIN)
# event queue
self._eventq = deque()
+ self.event_queue_size = 0
# system processing functor, common to all events
self._sys_proc_fun = _SysProcessEvent(self._watch_manager, self)
# default processing method
@@ -929,7 +930,7 @@ class Notifier:
# get event queue size
if fcntl.ioctl(self._fd, termios.FIONREAD, buf_, 1) == -1:
return
- queue_size = buf_[0]
+ self.event_queue_size = queue_size = buf_[0]
if queue_size < self._treshold:
log.debug('(fd: %d) %d bytes available to read but '
'treshold is fixed to %d bytes' % (self._fd,