Repository navigation
fix(python): share per-object locks and align StartChild timeouts - #5035
Merged
Merged
Conversation
dbrattli
marked this pull request as ready for review
October 3, 2026 20:12
Contributor
Python Type Checking Results (Pyright)
Excluded files with errors (4 files)These files have known type errors and are excluded from CI. Remove from
|
This was referenced Oct 7, 2026
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.
Concurrent F#
lockcalls on the same object currently create separate PythonRLockinstances, allowing their critical sections to overlap.Async.StartChildalso raises Python's built-inTimeoutErrorinstead of .NET'sTimeoutExceptionwhen its deadline expires.Changes
WeakValueDictionary. A short registry guard makes lookup and creation atomic and is released before acquiring the object lock or running user code. Holders and waiters retain their selected lock; unused entries are reclaimed without retaining the locked objects. Identity keys support unhashable and non-weak-referenceable objects.start_childentry point for both F# and Python callers. Deadline expiry raisesTimeoutException, whose native base from merged feat(python): give System exceptions native Python bases #5040 preserves Pythonexcept TimeoutErrorhandlers. Remove the separatestart_child_with_timeoutentry point and compiler special case.TimeoutErrorand .NETTimeoutException. Only cancellation caused by deadline expiry is translated.tests/Python/TestAsync.fs; await their completion so failures reach the runner. Remove the standalone timeout test and its build-copy step.Validation
git diff --checkpassed. Repository Fantomas policy excludestests/**.Event loop is closed) and generated syntax warning.