-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
aiohttp.Timeout
raises an RuntimeError inside asyncio based tornado app.
#877
Comments
I'll start looking into this one |
@asvetlov tornado doesn't update |
Yes, |
@bdarnell I believe the issue cannot be solved but want to let you know about it's existance at least.
|
Ugh. Yeah, that's relying on asyncio implementation details and cannot be used in any application or library that hopes to be portable across coroutine runners. |
To address @imjustfly's issue: Many asyncio methods assume that the whole world is asyncio, and don't work well when mixing asyncio and Tornado. The Tornado versions of these methods are generally better about this, so I'd recommend using tornado.gen.with_timeout instead:
(The convert_yielded call is because Tornado isn't perfect about accepting asyncio coroutines either. This will go away in the next release of Tornado). |
@bdarnell Got it ! Thank you. |
I use aiohttp as a client inside tornado,but the
aiohttp.Timeout
raises an RuntimeError.code example:
the exception is:
The text was updated successfully, but these errors were encountered: