Age | Commit message (Collapse) | Author | |
---|---|---|---|
2015-02-28 | Change the API to make iq.send() always return a future | mathieui | |
remove coroutine_wrapper, add a future_wrapper (which is only needed when the result stanza can be cached). Update the documentation as well. | |||
2015-02-23 | Add a coroutine_wrapper decorator | mathieui | |
This decorator checks for the coroutine=True keyword arg and wraps the result of the function call in a coroutine if it isn’t. This allows to have constructs like: @coroutine_wrapper def toto(xmpp, *, coroutine=False): if xmpp.cached: return xmpp.cached else: return xmpp.make_iq_get().send(coroutine=coroutine) @asyncio.coroutine def main(xmpp): result = yield from toto(xmpp, coroutine=True) xmpp.cached = result result2 = yield from toto(xmpp, coroutine=True) If the wrapper wasn’t there, the second fetch would fail. This decorator does not do anything if the coroutine argument is False. | |||
2015-01-05 | Fix the call of iscoroutinefunction() | Florent Le Coz | |
2015-01-03 | Use a deque for the idle list | Florent Le Coz | |
2015-01-03 | Delay the handling of stanza for when the process is not busy | Florent Le Coz | |
We use some dirty monkey-patching to add a idle_call() function to the asyncio module. We then use that method to handle each received stanza only when the event loop is not busy with some other IO (mainly, the standard input) |