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

Add timeout acquiring from pool #125

Closed

Conversation

mpaolini
Copy link
Contributor

@mpaolini mpaolini commented Jul 15, 2016

Stab at issue #16

TODO:

  • tests

@jettify
Copy link
Member

jettify commented Jul 15, 2016

asyncio usually do not pass timeout as kw argument in favour wait and wait_for, I think we should follow aiohttp:

with aiohttp.Timeout(0.001):
    async with aiohttp.get('https://github.com') as r:
        await r.text()

this context manager is present in new asyncio and packaged with aiohttp.

@mpaolini
Copy link
Contributor Author

so you are suggesting we close #16 ?

@asvetlov
Copy link
Member

Unfortunately asyncio.timeout was ripped out from asyncio due problems with tornado.
aiohttp.Timeout is working and will present for very long time.

So yes, I suggest using timeout context manager and don't add timeout parameter.

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

Successfully merging this pull request may close these issues.

None yet

3 participants