Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you use this with a Tornado application #4

Closed
rajdeeprath opened this issue Oct 20, 2019 · 2 comments
Closed

How do you use this with a Tornado application #4

rajdeeprath opened this issue Oct 20, 2019 · 2 comments

Comments

@rajdeeprath
Copy link

How do you use it in a Tornado application?

Using :

loop = asyncio.get_event_loop()

try:
    loop.run_until_complete(msh.start())
except KeyboardInterrupt:
    print('exit')

Blocks my application.

@aohan237
Copy link
Owner

aohan237 commented Oct 20, 2019

if you use asyncio loop in tornado, msh.start() can be used as common tonardo croutine.
you dont need to manually start the loop, tornado will start loop for you.

in this case, you only need to schedule the msh.start as the common tornado croutine.
let tornado do the rest.

hope this can help you

@aohan237
Copy link
Owner

if there is no updtes, then this issue should be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants