Skip to content

Instantly share code, notes, and snippets.

@an01f01
Last active December 1, 2022 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save an01f01/16846e26e9ad422a78be7470a36b9734 to your computer and use it in GitHub Desktop.
Save an01f01/16846e26e9ad422a78be7470a36b9734 to your computer and use it in GitHub Desktop.
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