diff --git a/Home.md b/Home.md index bdca148..bfe70f8 100644 --- a/Home.md +++ b/Home.md @@ -1 +1,15 @@ -Welcome to the uvloop wiki! +# Q & A + +### 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() +``` \ No newline at end of file