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

Support of BlockingConnectionPool #189

Open
sileht opened this issue Mar 25, 2021 · 4 comments · May be fixed by synodriver/aredis#9
Open

Support of BlockingConnectionPool #189

sileht opened this issue Mar 25, 2021 · 4 comments · May be fixed by synodriver/aredis#9

Comments

@sileht
Copy link

sileht commented Mar 25, 2021

Hi there,

aredis is lacking of BlockingConnectionPool.

Do this kind of feature could be accepted if I propose a Pull Request?
(and if it matches all the projects requirements and worked, of course :) )

I have started to take a look, the only blocking point I see is a small change into the ConnectionPool API.
ConnectionPool.get_connection() have to become async to be able to use asyncio.Queue()

Is that API change, ok ?

@sileht
Copy link
Author

sileht commented Mar 25, 2021

Another solution that would not break the API, would be to replace all get_connection() calls with something like:

conn = pool.get_connection()
if asyncio.iscoroutine(conn):
    conn = await conn

sileht added a commit to sileht/aredis that referenced this issue Mar 25, 2021
@sileht
Copy link
Author

sileht commented Mar 25, 2021

Here an idea of what it will looks like: #190

@sileht
Copy link
Author

sileht commented Apr 9, 2021

Any updates?

1 similar comment
@sileht
Copy link
Author

sileht commented Apr 29, 2021

Any updates?

@synodriver synodriver linked a pull request Nov 26, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant