Module pyinotify :: Class AsyncioNotifier
[hide private]
[frames] | no frames]

Class AsyncioNotifier

source code


asyncio/trollius event loop adapter.

Instance Methods [hide private]
 
__init__(self, watch_manager, loop, callback=None, default_proc_fun=None, read_freq=0, threshold=0, timeout=None)
See examples/asyncio_notifier.py for an example usage.
source code
 
stop(self)
Close inotify's instance (close its file descriptor).
source code
 
handle_read(self, *args, **kwargs) source code

Inherited from Notifier: append_event, check_events, coalesce_events, loop, proc_fun, process_events, read_events

Inherited from Notifier (private): _sleep

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, watch_manager, loop, callback=None, default_proc_fun=None, read_freq=0, threshold=0, timeout=None)
(Constructor)

source code 

See examples/asyncio_notifier.py for an example usage.

Parameters:
  • loop (asyncio.BaseEventLoop or trollius.BaseEventLoop instance.) - asyncio or trollius event loop instance.
  • callback (callable object or function) - Functor called at the end of each call to handle_read. Expects to receive the notifier object (self) as single parameter.
Overrides: object.__init__

stop(self)

source code 

Close inotify's instance (close its file descriptor). It destroys all existing watches, pending events,... This method is automatically called at the end of loop(). Afterward it is invalid to access this instance.

Overrides: Notifier.stop
(inherited documentation)