{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/4"}],"enrichment":{"capability":"Provides reader-writer lock implementations for Python that solve the three classical reader-writer synchronization problems with configurable priority schemes (reader, writer, or fair) and optional lock downgrading.","skillfed_tags":["concurrency","threading","synchronization"],"use_cases":["Protect a shared cache or in-memory data structure where reads vastly outnumber writes and you want many concurrent readers.","Implement a fair lock for a resource where both readers and writers must be served without starvation, such as a shared log or configuration store.","Build a write-heavy system where writer priority prevents reader threads from blocking critical updates indefinitely.","Use lock downgrading when a thread acquires write access to check-then-update a value, then only needs read access afterward without releasing and re-acquiring.","Add timeout-based lock acquisition to detect and handle deadlock scenarios in multi-threaded applications."],"what_it_does":"readerwriterlock is a pure-Python implementation of the three classical reader-writer synchronization problems\u2014a concurrency pattern where multiple readers can hold a lock simultaneously, but writers require exclusive access. The package provides six lock classes: three prioritize readers, writers, or fairness respectively, and three downgradable variants that allow atomically converting a write lock to a read lock (with a documented ~20% performance cost). All classes conform to Python's standard threading.Lock interface, including support for timeouts and context managers.\n\nYou instantiate a lock class, then call gen_rlock() or gen_wlock() to create reader or writer lock objects that you acquire and release in your code. The choice of class determines scheduling behavior: reader-priority favors read throughput, writer-priority prevents writer starvation, and fair-priority balances both. The package depends only on typing-extensions and has no system-level dependencies.","worth_installing":"Yes, if you need a reader-writer lock and are comfortable with an abandoned package. The implementation is marked Production/Stable with no known vulnerabilities and has 104 GitHub stars, suggesting stability. Reader-writer locks are a well-understood pattern unlikely to require frequent updates. However, verify compatibility with your Python version and consider whether the lack of maintenance is acceptable for your use case."},"id":"readerwriterlock","links":{"html":"https://skillfed.io/packages/readerwriterlock","md":"https://skillfed.io/packages/readerwriterlock.md","pypi":"https://pypi.org/project/readerwriterlock/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2021-09-06","license_spdx":null,"license_treatment":"permissive","name":"readerwriterlock","python_support":"supports_current","summary":"A python implementation of the three Reader-Writer problems."},"popularity":{"monthly_downloads":2657969,"position":2956,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.0.9"}
