uvloop Drop In Replacement for asyncio Event Loop

#1

Group,

Came across this yesterday via python news.

Looks interesting and going to experiment with it. Anyone already using it?

http://magic.io/blog/uvloop-blazing-fast-python-networking/

https://pypi.python.org/pypi/uvloop

-Dave

0 Likes

#2

Hi Dave,

I’m using it right now while trying to learn autobhan, I can not give you yet any advice for or against it right now, but, what I can tell you is I had a bug for a little prototype using queue, and, after lots and lots of hours trying to understand what was wrong, I found that I had a problem because I created a queue before switching the default loop policy.

So, if you want to try it (and it’s easy, pip install uvloop, import uvloop, asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()), that’s all) be super careful to set the event policy as soon as you can. The problem with that is AMHO, you have to check there is no side effect when you import other modules (I mean, you have to put the switch at the very top of your files, after uvloop import and before anything else)

My two cents (okay, maybe that’s a lot for the value of this post)

Nicolas

···

On Thursday, May 5, 2016 at 6:28:11 PM UTC+2, Dave Thomas wrote:

Group,

Came across this yesterday via python news.

Looks interesting and going to experiment with it. Anyone already using it?

http://magic.io/blog/uvloop-blazing-fast-python-networking/

https://pypi.python.org/pypi/uvloop

-Dave

0 Likes

#3

Thank you Nicolas!

0 Likes