This is the initial release (v0.1.0) of the `valuelock` Python package. `valuelock` is a simple and reliable locking mechanism for coordinating access to shared resources in multithreaded Python applications.
Key Features:
- Provides a context manager `get_lock` for acquiring and releasing locks with unique IDs.
- Supports custom callback functions to determine lock obsolescence.
- Ensures thread safety when accessing shared resources.
- Ideal for protecting critical sections of code in multithreaded applications.
Usage:
To use `valuelock`, simply install it using `pip`:
python
pip install valuelock
Here's an example of how to use it:
python
import valuelock
Acquire and release locks to protect shared resources
with valuelock.get_lock("resource_id"):
Your protected code here
For more information and detailed usage instructions, please refer to the [GitHub repository](https://github.com/killbus/py-valuelock) and the package documentation.
Release Notes:
- Added initial version of `valuelock` package (v0.1.0).
- Provides basic functionality for locking and protecting shared resources.
- Allows users to specify custom callback functions for determining lock obsolescence.
- Designed for use in multithreaded Python applications.