does python have a generic object pool like commons-pool in Java

Jonathan Gardner jgardner at jonathangardner.net
Wed Jul 15 04:53:51 EDT 2009


On Jul 14, 6:34 pm, Rick Lawson <lawso... at gmail.com> wrote:
> Appreciate any help on this. I am porting an app from Java to python
> and need generic object pooling with hooks for object initialization /
> cleanup and be able to specify an object timeout.
>

Are you looking for something like a thread pool or a connection pool?
Such a thing is easy to code in Python. Might as well write one from
scratch for your particular need.

By the way, a tip for writing Python: Forget Java. If you're porting
an app, consider rewriting it from the architecture on up. You'll save
yourself time and get a better result.



More information about the Python-list mailing list