aredis icon indicating copy to clipboard operation
aredis copied to clipboard

Support of BlockingConnectionPool

Open sileht opened this issue 4 years ago • 4 comments

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 avatar Mar 25 '21 10:03 sileht

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 avatar Mar 25 '21 10:03 sileht

Here an idea of what it will looks like: https://github.com/NoneGG/aredis/pull/190

sileht avatar Mar 25 '21 17:03 sileht

Any updates?

sileht avatar Apr 09 '21 12:04 sileht

Any updates?

sileht avatar Apr 29 '21 06:04 sileht