Repository navigation
Fix SimpleQueue get and argument handling - #9641
Closed
youknowdot wants to merge 4 commits into
Closed
youknowdot wants to merge 4 commits into
youknowdot wants to merge 4 commits into
Conversation
Assisted-by: OpenAI Codex:model version not exposed
Contributor
|
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. CodeRabbit Verify
|
Assisted-by: OpenAI Codex:model version not exposed
Assisted-by: OpenAI Codex:model version not exposed
Assisted-by: OpenAI Codex:model version not exposed
youknowdot
added a commit
to youknowdot/RustPython
that referenced
this pull request
Nov 6, 2026
Incorporate RustPython#9641 intact, preserving its original commits and attribution. Assisted-by: OpenAI Codex:model version not exposed
Contributor
Author
|
Consolidated into #9652 at 8e59835. All four original commits are preserved as ancestors, including the nonblocking permit and atomic-publication fixes. SimpleQueue now shares pytime conversion while retaining its ceiling rounding and caller-specific timeout policy. The combined test_queue suite passed; full aggregate checks and exact-head CI remain pending. Closing this duplicate without deleting its branch. |
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.
Summary
SimpleQueue.get(block=False)through the existing nonblocking removal path. Previously a threaded nonblockinggetremoved an item without consuming its semaphore permit, so later consumers could observe stale permits.blockargument forputandget, after argument binding; preserve explicitNoneas false.__index__before__float__, validate signed nanosecond bounds and round up as CPython does, reject NaN/negative values appropriately, and use checked deadline addition. Infinite or very large timeouts no longer reach a panickingDuration::from_secs_f64path.Scope
Generic argument-binding diagnostics, lower-level numeric-slot diagnostics, existing item ownership, waiting/polling behavior and direct-handoff/fairness differences are not addressed.
putstill acquires the same two mutexes but now holds them together briefly, so contention effects are unbenchmarked. If a platform'sInstantcannot represent a valid deadline, this returnsOverflowError; CPython instead saturates its internal deadline.Validation
get(False),get(),get_nowait(),putandqsizecalls, including lock ordering and stop-the-world interactions. ExistingLib/test/test_queue.pyexercises mixed and concurrent nonblocking calls.__index__precedence, propagated callback errors, nanosecond rounding, NaN and overflow cases.