mirror of https://github.com/MagicStack/uvloop.git
Updated Home (markdown)
parent
0e123583e7
commit
f5d6ac4d2c
11
Home.md
11
Home.md
|
@ -1,6 +1,17 @@
|
||||||
# Q & A
|
# 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?
|
### How to use uvloop with aiohttp+gunicorn?
|
||||||
|
|
||||||
You have to use a special gunicorn worker class that aiohttp bundles since 0.22.0:
|
You have to use a special gunicorn worker class that aiohttp bundles since 0.22.0:
|
||||||
|
|
Loading…
Reference in New Issue