🐛 fix(soft-rw): reject non-finite timing options - #724
Open
lprnmns wants to merge 1 commit into
Open
Conversation
lprnmns
force-pushed
the
codex/fix-soft-rw-finite-intervals
branch
from
September 2, 2026 21:28
34e839c to
d92050e
Compare
lprnmns
marked this pull request as ready for review
September 3, 2026 10:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
SoftReadWriteLockaccepts NaN and Infinity for its timing options. Those values can turn heartbeat waits into a busy loop, prevent stale markers from expiring, or defer an invalid poll delay untilsleep().Change
Reject non-finite
heartbeat_interval,stale_threshold, andpoll_intervalvalues alongside the existing range checks.Validation
pytest -q tests/soft_rw— 104 passedruff check src tests/soft_rwruff format --check src tests/soft_rwty check tests/soft_rw/test_soft_rw_sync.pygit diff --checkNo public API shape changes; valid timing values behave as before.