History | View | Annotate | Download (9.1 kB)
Enhance pooling API, implementation, and tests
- Verify objects (new and old) with a hook _pool_verify. Discard objects from the pool that fail verification. A newly created object failing verification is fatal.
- Remove all hooks from the pool set access critical section....
Extend ObjectPool functionality, tests
Rename ObjectPool methods to pool_{put(), get()}
Support timeout in ObjectPool.get(), fix tests
Support optional timeout argument in ObjectPool.get(),if supported by the underlying Semaphore implementation.
Implement command-line argument for ObjectPool unit tests to runinside gevent monkey-patched environment.
Add ObjectPool class in synnefo.lib
Add ObjectPool class in synnefo.lib.The ObjectPool class is an abstract pool of objects,based on Semaphore locks, as provided by the threadingpackage.
Tested to work with a gevent-monkey-patched threading package.Uncomment the relevant lines in pool/tests.py to test with greenlet...