Closed schlitzered closed 5 years ago
No, there isn't, sorry. You have to build your own. But a contribution about this would be much appreciated. :)
i take a look.
i guess the easiest thing would be to implement the connection pool directly in LDAPClient.
i think of adding a new parameter to init that will be called pool_size.
i will then add a acquire and release function, that can be used to get & return LDAPConnection objects.
i would also implement enter and exit functions, so LDAPClient can be used as a context manager.
what do you think?
I think a separate ConnectionPool
class and a get_connection_pool
or create_connection_pool
method on LDAPClient
would be better, easier to maintain.
Also different connection types (async, gevent, etc.) probably will require slightly different pool implementations, so a base class that can be used for inheriting would be beneficial.
The context manager (on the ConnectionPool
class) is a great idea.
I know, quite some time has passed, but I've added some connection pool classes that are currently on the feature/pool branch. I'm planning to include these modifications in the next release (that'll happen in a few days with some luck). If you have any thoughts about it, please share them.
Basic pool functionality is available now in 1.1.0.
is there a connection pool in place, or do i have to build my own connection pool on top of this library?