summaryrefslogtreecommitdiff
path: root/slixmpp/xmlstream/asyncio.py
AgeCommit message (Collapse)Author
2016-10-05Remove monkeypatching hack on the event loopmathieui
This allowed us to schedule events in-order later in the event loop, but was detrimental to using other event loops and debugging.
2015-02-28Change the API to make iq.send() always return a futuremathieui
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-23Add a coroutine_wrapper decoratormathieui
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-05Fix the call of iscoroutinefunction()Florent Le Coz
2015-01-03Use a deque for the idle listFlorent Le Coz
2015-01-03Delay the handling of stanza for when the process is not busyFlorent 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)