gh-154043: Fix a data race when iterating a shared types.GenericAlias iterator in FT build#154108
gh-154043: Fix a data race when iterating a shared types.GenericAlias iterator in FT build#154108ByteFlowing1337 wants to merge 3 commits into
types.GenericAlias iterator in FT build#154108Conversation
|
@serhiy-storchaka Do you mind reviewing this PR? Thanks. |
|
I noticed that there was already a test file named test_types.py written for testing But I think its filename is incorrect, it should be |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
There is one behavior change here -- when Py_GenericAlias() fails, obj is now consumed anyway. But I think it is fine.
|
So there should not be any race condition on practice. I do not mind using atomic exchange here, but I think that such large and expensive test is not worth it. Remove it. |
Uh oh!
There was an error while loading. Please reload this page.