From 0e123583e7922f6f60a94f40392dfd8563521e81 Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Wed, 27 Jul 2016 11:07:09 -0400 Subject: [PATCH] Updated Home (markdown) --- Home.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Home.md b/Home.md index bfe70f8..d61d213 100644 --- a/Home.md +++ b/Home.md @@ -1,5 +1,17 @@ # Q & A + +### How to use uvloop with aiohttp+gunicorn? + +You have to use a special gunicorn worker class that aiohttp bundles since 0.22.0: + +```bash +$ gunicorn ... --worker-class aiohttp.worker.GunicornUVLoopWebWorker +``` + +Starting your application this way will automatically make `asyncio.get_event_loop()` to return a uvloop event loop. There is no need to manually install uvloop policy. + + ### How to use uvloop with Tornado? Install uvloop event policy before calling `AsyncIOMainLoop().install()`: