A generic thread-safe resource pool for Python.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.bumpversion.cfg
.gitignore
LICENSE
README.md
resource_pool.py
setup.cfg
setup.py
test_resource_pool.py

README.md

resource-pool

A generic thread-safe resource pool implementation for Python.

Installation

pip install resource_pool

Usage

from resource_pool import Pool

pool = Pool(factory=lambda: 42, pool_size=30)
with pool.reserve(timeout=10) as n:
    print(n)

License

resource_pool is licensed under Apache 2.0. Please see LICENSE for licensing details.