On 2016-05-04 3:46 AM, Stefan Scherfke wrote:
Hi Yury,
Am 2016-05-04 um 00:43 schrieb Yury Selivanov <[email protected]>:
Hi,
Please check out a new asyncio event loop implementation uvloop.
Here's a blog post about it:
http://magic.io/blog/uvloop-make-python-networking-great-again/
Thanks, Yury
very nice work. aiomas (https://aiomas.readthedocs.io/) works very well
with it.
I only found one problem: the default event loop's create_task() accepts
the empty string '' as host name and will bind the server to all
available interfaces. With uvloop however, I get a TypeError:
File "uvloop/loop.pyx", line 1026, in create_server (uvloop/loop.c:19287)
File "uvloop/loop.pyx", line 509, in uvloop.loop.Loop._getaddrinfo
(uvloop/loop.c:12059)
TypeError: host must be a str or bytes
Thanks for submitting a PR! This is now fixed in v0.4.11.
The low-level aiomas example attached at the end of this mail takes ~22s
with the default event loop but only ~15s with uvloop, which is ~45%
faster. :-)
This is great to hear! Thanks for sharing this!
Yury