Re: WSGI and asyncio (tulip)?
Antoine Pitrou <[email protected]> Tue, 14 Oct 2014 20:30:38 +0200
| Newsgroups | gmane.comp.python.web |
|---|---|
| Message-ID | <20141014203038.7e4ca1d5@fsol> |
On Tue, 14 Oct 2014 09:47:35 -0700 Guido van Rossum <[email protected]> wrote: > > I'm wondering if a small extension to the WSGI protocol might be sufficient > to support this: the special environ variable "wsgi.async_input" could > optionally be tied to a standard asyncio stream reader ( > https://docs.python.org/3/library/asyncio-stream.html#streamreader), from > which bytes can be read using "yield from stream.read([nbytes])" or "yield > from stream.readline()". I think it would be frankly better to hook at the transport/protocol level, and let people wrap that inside an asyncio stream if that's their preference. It would also allow easier interoperability with other non-blocking frameworks, since the callback-oriented nature is a common characteristic, IMHO. Regards Antoine. _______________________________________________ Web-SIG mailing list [email protected] Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: https://mail.python.org/mailman/options/web-sig/gcpw-web-sig%40m.gmane.org