Repository navigation
Align LRU cache keys and callback controls - #9681
youknowdot wants to merge 2 commits into
Conversation
Use shared constructor conversions and exact scalar cache keys. Preserve stored keys during recency updates, validate reentrant lookups through existing dictionary entry machinery, and match recursive insertion and eviction reference-release ordering. Assisted-by: OpenAI Codex:model version not exposed
Drop the now-unused crate-private known-hash deletion wrapper and transfer the owned unbounded cache result directly. Assisted-by: OpenAI Codex:model version not exposed
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Merging this PR will not alter performance
Comparing Footnotes
|
Summary
The helper changes address stale reads or removals when equality clears and repopulates a dictionary position. Failed insertion releases the newly computed result before the evicted key/result, matching CPython.
Reference: CPython 3.15.0 LRU implementation.
Validation
rustpython-stdlib/threadingpassed after removing the obsolete deletion wrapper and a redundant clone. Normal repository hooks passed.Composition with #9679 requires reconciling the shared import hunk to retain both ArgIntoBool and Callee; the behavioral sections are separate.
AI assistance: OpenAI Codex performed source comparison, implementation, reference probes and independent source review; model version was not exposed.