Skip to content

[mypyc] Make for loop over list memory-safe on free-threaded builds#21686

Open
JukkaL wants to merge 2 commits into
masterfrom
mypyc-safe-for-list
Open

[mypyc] Make for loop over list memory-safe on free-threaded builds#21686
JukkaL wants to merge 2 commits into
masterfrom
mypyc-safe-for-list

Conversation

@JukkaL

@JukkaL JukkaL commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Don't access list items directly but use CPython C API functions for item access. Also, reading the list length should use an atomic relaxed memory order read, but changing this is lower priority and won't be fixed until later. There is no change on non-free-threaded Python builds.

Work on mypyc/mypyc#1202.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants