Last active
December 1, 2022 18:37
-
-
Save an01f01/16846e26e9ad422a78be7470a36b9734 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
# ... | |
# Added async to main | |
async def main(): | |
print("starting tornado server..........") | |
app = make_app() | |
app.listen(tornado.options.options.port) | |
await asyncio.Event().wait() | |
# Running main on its own thread | |
if __name__ == '__main__': | |
asyncio.run(main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment