Open glyph opened 6 years ago
Would it be accurate to describe this as asking for non-blocking support in the python API?
I think @kcr's https://github.com/1ts-org/snipe/blob/master/snipe/zulip.py#L127 has some work that could be borrowed/extracted for this (since snipe
is a Python cross-protocol IM client that uses asyncio).
Would it be accurate to describe this as asking for non-blocking support in the python API?
Yep; any form of modern asyncio/tornado/Twisted support could ultimately be converted into this, and could therefore close this ticket.
I'd love a version of
call_on_each_event
that would not block, and instead register a callable with a reactor.This could probably be combined with fairly general / framework agnostic async support by having the existing implementation be converted into a coroutine which
await
s different kinds of things (treq
requests in the Twisted case, synchronously-returning coroutines that just call requests in the default / existing case,aiohttp
Futures for asyncio).