mirror of https://github.com/MagicStack/uvloop.git
Destroyed Q&A (markdown)
parent
f48eaf4afb
commit
a8fb8cadad
13
Q&A.md
13
Q&A.md
|
@ -1,13 +0,0 @@
|
||||||
### How to use uvloop with Tornado?
|
|
||||||
|
|
||||||
Install uvloop event policy before calling `AsyncIOMainLoop().install()`:
|
|
||||||
|
|
||||||
```python
|
|
||||||
from tornado.platform.asyncio import AsyncIOMainLoop
|
|
||||||
import asyncio
|
|
||||||
import uvloop
|
|
||||||
|
|
||||||
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
|
||||||
AsyncIOMainLoop().install()
|
|
||||||
asyncio.get_event_loop().run_forever()
|
|
||||||
```
|
|
Loading…
Reference in New Issue