From bf4295ccdba8fbd9a1f39c53fdc1941759633f60 Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 19 Aug 2015 13:12:19 +0200 Subject: [PATCH] Add comment for wait parameter --- hbmqtt/plugins/manager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hbmqtt/plugins/manager.py b/hbmqtt/plugins/manager.py index 0621866..95c4468 100644 --- a/hbmqtt/plugins/manager.py +++ b/hbmqtt/plugins/manager.py @@ -91,14 +91,17 @@ class PluginManager: return asyncio.Task(coro, loop=self._loop) @asyncio.coroutine - def fire_event(self, event_name, *args, **kwargs): + def fire_event(self, event_name, wait=False, *args, **kwargs): """ Fire an event to plugins. PluginManager schedule async calls for each plugin on method called "on_" + event_name For example, on_connect will be called on event 'connect' + Method calls are schedule in the asyn loop. wait parameter must be set to true to wait until all + mehtods are completed. :param event_name: :param args: :param kwargs: + :param wait: indicates if fire_event should wait for plugin calls completion (True), or not :return: """ tasks = []