From f5d6ac4d2c951abf40b95ee369014f34f6b23fec Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Wed, 27 Jul 2016 11:08:28 -0400 Subject: [PATCH] Updated Home (markdown) --- Home.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Home.md b/Home.md index d61d213..ffc91a9 100644 --- a/Home.md +++ b/Home.md @@ -1,6 +1,17 @@ # Q & A +### How to use uvloop in an asyncio application? + +Just install the uvloop event policy: + +```python +import asyncio +import uvloop +asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) +``` + + ### How to use uvloop with aiohttp+gunicorn? You have to use a special gunicorn worker class that aiohttp bundles since 0.22.0: