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

Best way forward with regards to native coroutines #41

Open
PatTheMav opened this issue May 30, 2017 · 3 comments
Open

Best way forward with regards to native coroutines #41

PatTheMav opened this issue May 30, 2017 · 3 comments
Labels

Comments

@PatTheMav
Copy link

I'd just appreciate to hear your opinion on this, as I'm planning to update my Tornado app for async/await (and looking forward to Tornado 5):

Would a fork of tornadis for Python 3.5+ using native coroutines be the best move forward (especially regarding the gotchas mentioned in the official Tornado docs - I'm not aware how much tornadis relies on some of that functionality)?

Or is this something that this project will tackle down the line?

@PatTheMav
Copy link
Author

FYI - I'm currently migrating my web app to Python 3.5 and async/await - so far most functionality works as intended (as Tornado "marks" generated coroutines for native usage) with the exception of the ContextManagerFuture which doesn't seem to work (and leads to blocking the whole application when used with await) - probably requires an asynchronous context manager as as defined in PEP-492.

@thefab
Copy link
Owner

thefab commented Jul 28, 2017

Hi,

Sorry for the reply delay. I don't know a lot about native coroutines because I can't work on python >= 3.5 only.

I think that a fork will be better at this time.

If you are interested, I can add a link to your fork in the REAME for people interested in native coroutines.

Regards

@PatTheMav
Copy link
Author

Hey @thefab,

Thanks for your reply - alas I'm not really well suited to be the one writing or even maintaining a fork at this moment (writing software is more of a guilty pleasure for me).

As I've mentioned in my second comment tornadis is working with native coroutines without issue as long as no context manager patterns are used (the tornado generators take care of making the coroutines compatible with each other) and the only benefit would be a considerable speed improvement (especially given Tornado 5.0's move to asyncio instead of its own ioloop).

But I agree that such a fork or (backward-compatibility breaking) major release might be necessary to reap the performance benefits asyncio and native coroutines bring.

@thefab thefab added the question label May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants