gh-123471: Make concurrent iteration over itertools.repeat safe under free-threading#131247
gh-123471: Make concurrent iteration over itertools.repeat safe under free-threading#131247kumaraditya303 merged 3 commits intopython:mainfrom
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