mirror of https://github.com/MagicStack/uvloop.git
Updated Home (markdown)
parent
a8fb8cadad
commit
0e123583e7
12
Home.md
12
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()`:
|
||||
|
|
Loading…
Reference in New Issue