Skip to content

Implement the reader-writer lock with threading.Condition - #446

Closed
EmryZhang wants to merge 1 commit into
review/casbin-20261121/publisher-routefrom
review/casbin-20261121/lock-source
Closed

EmryZhang wants to merge 1 commit into
review/casbin-20261121/publisher-routefrom
review/casbin-20261121/lock-source

Conversation

@EmryZhang

Copy link
Copy Markdown
Contributor

Summary

Use the standard library to implement the existing locking contract. Retain writer preference and cross-thread release behavior and add focused contract regressions.

Review order

This draft targets the branch for #445. Review that change first. After it merges, rebase this branch onto the default branch as needed, retarget this PR, and rerun the affected checks before merging.

Validation

Checked the exact source tree and focused lock regressions. The corresponding combined source archive passed 415 tests and was rebuilt as wheel and sdist.

@hsluoyz

hsluoyz commented Nov 21, 2026

Copy link
Copy Markdown
Member

Thanks! This stack (#442 to #446) landed as a single commit, 5abf955, because the drafts were chained and the intermediate states disagreed (for example #442 still described the readerwriterlock dependency that was dropped in #440). The final tree of #446 is kept, with these changes:

  • LICENSE and NOTICE are unchanged from master. The full CC0 text for the .gitignore template is gone, because .gitignore is now a short list written for this repository. The per-header copyright list is gone too, because the existing Copyright 2017-2026 The casbin Authors line already covers it.
  • .rat-excludes uses *.csv instead of listing every policy fixture by name.

Checked on the result: 479 unit tests (1 skipped), 26 release-script tests, black --check, wheel and sdist build, twine check --strict, and release.py python-check on both packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants