-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-123471: Make concurrent iteration over itertools.repeat safe under free-threading #131247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Is it possible to create tests demonstrating code the previously failed that can now be counted on to succeed? |
@rhettinger The issue that this PR solves is the following: when defining the iterator as
we can have multiple threads passing the condition A test for this is:
On my system this creates a deadlock (typically after a couple of 1000) iterations in a free-threading debug build. |
|
The iOS failure is caused by #127108 |
If needed we can add a unit test similar to the one in https://github.com/python/cpython/pull/131212/files