| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…tched wait ``i > res[0] & i not in res`` parses as ``i > (res[0] & i) not in res`` because ``&`` binds tighter than comparisons, so the Windows >60-handle path of ``_exhaustive_wait`` kept the wrong handles. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sorry, something went wrong.
There was a problem hiding this comment.
If possible add a regression test
Sorry, something went wrong.
| @@ -0,0 +1,3 @@ | |||
| Fix :func:`multiprocessing.connection.wait` on Windows with more than 60 | |||
| handles: the batched wait used ``&`` where ``and`` was meant when removing | |||
There was a problem hiding this comment.
Do not mention the & detail. It is an implementation detail.
Sorry, something went wrong.
There was a problem hiding this comment.
Done, the NEWS entry now describes the user visible effect only:
Fix :func:multiprocessing.connection.wait on Windows when waiting on more than 60 objects: an object that was already ready could be reported more than once, and other ready objects could be left out of the result.
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Added a regression test in TestWait.test_exhaustive_wait_more_than_60_handles. It creates 70 manual reset events, signals four of them spread across the list (indices 3, 17, 42 and 68, leaving index 0 unsignalled so the batched path is actually exercised), and checks that _exhaustive_wait returns exactly those four. On the old code the filter kept the already signalled handles in the remaining list, so they were waited on again and the call returned [3, 17, 42, 68, 17, 42, 68]. It also dropped unsignalled handles that should have stayed in the list. The test is skipped off Windows, so the Windows CI job is what covers it. I have made the requested changes; please review again |
Sorry, something went wrong.
|
Thanks for making the requested changes! @picnixz: please review the changes made to this pull request. |
Sorry, something went wrong.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The Windows jobs went red on my previous push and I have just fixed the test that caused it. Two mistakes in it, both my own, the connection.py change is untouched:
Sorry for the noise. |
Sorry, something went wrong.
|
You need to sign the CLA as well |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
In the Windows branch of multiprocessing.connection._exhaustive_wait() that handles more than 60 handles, the filter
parses as i > (res[0] & i) not in res because & binds tighter than the comparison operators, so signalled handles could stay in the list and unsignalled ones be dropped. Use and, as intended.