René's URL Explorer Experiment


Title: gh-120321: Make gi_frame_state transitions atomic in FT build by colesbury · Pull Request #142599 · python/cpython · GitHub

Open Graph Title: gh-120321: Make gi_frame_state transitions atomic in FT build by colesbury · Pull Request #142599 · python/cpython

X Title: gh-120321: Make gi_frame_state transitions atomic in FT build by colesbury · Pull Request #142599 · python/cpython

Description: This makes generator frame state transitions atomic in the free threading build, which avoids segfaults when trying to execute a generator from multiple threads concurrently. There are still a few operations that aren't thread-safe and may crash if performed concurrently on the same generator/coroutine: Accessing gi_yieldfrom/cr_await/ag_await Accessing gi_frame/cr_frame/ag_frame Async generator operations Issue: gh-120321

Open Graph Description: This makes generator frame state transitions atomic in the free threading build, which avoids segfaults when trying to execute a generator from multiple threads concurrently. There are still a few ...

X Description: This makes generator frame state transitions atomic in the free threading build, which avoids segfaults when trying to execute a generator from multiple threads concurrently. There are still a few ...

Opengraph URL: https://github.com/python/cpython/pull/142599

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:e0160e33-f6c6-8cf0-7708-884f18865a68
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA748:21D998:401E35:5C774F:6A572B6D
html-safe-noncec234052f2b55ff8fe62e158419994d869c64eb417bca9476e9790ec353344972
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzQ4OjIxRDk5ODo0MDFFMzU6NUM3NzRGOjZBNTcyQjZEIiwidmlzaXRvcl9pZCI6Ijg3NTgyMzQ4NTg2Njc4NDY1MDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac21d5dd7d30388929419bf31a6738fe75d8a4fcfa4eaca3fd93f2361ca1789b3b
hovercard-subject-tagpull_request:3094328077
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/142599/files
twitter:imagehttps://avatars.githubusercontent.com/u/655866?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/655866?s=400&v=4
og:image:altThis makes generator frame state transitions atomic in the free threading build, which avoids segfaults when trying to execute a generator from multiple threads concurrently. There are still a few ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2576d1f0198cf1588faf2edf27f1ed120903be10
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/142599/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F142599%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F142599%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/142599/files
Reloadhttps://github.com/python/cpython/pull/142599/files
Reloadhttps://github.com/python/cpython/pull/142599/files
Please reload this pagehttps://github.com/python/cpython/pull/142599/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/142599/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
colesburyhttps://github.com/colesbury
python:mainhttps://github.com/python/cpython/tree/main
colesbury:gh-120321-gen-atomichttps://github.com/colesbury/cpython/tree/gh-120321-gen-atomic
Conversation 28 https://github.com/python/cpython/pull/142599
Commits 18 https://github.com/python/cpython/pull/142599/commits
Checks 75 https://github.com/python/cpython/pull/142599/checks
Files changed https://github.com/python/cpython/pull/142599/files
Please reload this pagehttps://github.com/python/cpython/pull/142599/files
gh-120321: Make gi_frame_state transitions atomic in FT build https://github.com/python/cpython/pull/142599/files#top
Show all changes 18 commits https://github.com/python/cpython/pull/142599/files
bc054db gh-120321: Make gi_frame_state transitions atomic in FT build colesbury Dec 2, 2025 https://github.com/python/cpython/pull/142599/commits/bc054db9aa6d42c34acad0648054c582673f94ab
77fee35 Add some tests colesbury Dec 12, 2025 https://github.com/python/cpython/pull/142599/commits/77fee3579c3b26e705603a1430e726308727729f
1236692 Merge branch 'main' into gh-120321-gen-atomic colesbury Dec 12, 2025 https://github.com/python/cpython/pull/142599/commits/123669254a4d8030f542adf770d56e23a16cfe4c
ac3974d Remove unused import colesbury Dec 12, 2025 https://github.com/python/cpython/pull/142599/commits/ac3974df0bef87b3471c6226d5d7f22dd071af32
b285594 Update Objects/genobject.c colesbury Dec 15, 2025 https://github.com/python/cpython/pull/142599/commits/b285594849a5ed197bed1edba4ed563749f7270e
9c1c0fe Update Objects/genobject.c colesbury Dec 15, 2025 https://github.com/python/cpython/pull/142599/commits/9c1c0fe9ccf24d2f3afedc7415145afcfbf05460
3876dd0 Changes from review colesbury Dec 15, 2025 https://github.com/python/cpython/pull/142599/commits/3876dd0d4b780812f455a5a6121e296e23868064
46a8699 Merge branch 'main' into gh-120321-gen-atomic colesbury Dec 15, 2025 https://github.com/python/cpython/pull/142599/commits/46a8699e93323def185af38150422c7d3aaa69a1
46a8e84 Remove extra whitespace colesbury Dec 15, 2025 https://github.com/python/cpython/pull/142599/commits/46a8e84b05968adc0093bbc796a0a64d35649dd1
15c2604 Merge branch 'main' into gh-120321-gen-atomic colesbury Dec 16, 2025 https://github.com/python/cpython/pull/142599/commits/15c2604c4d57775aca1c5c54cab9fb329e653ee9
64155ab Rename _Py_GEN_SET_FRAME_STATE to _Py_GEN_TRY_SET_FRAME_STATE colesbury Dec 16, 2025 https://github.com/python/cpython/pull/142599/commits/64155ab438951cdb008196b4d9f7db5cd867d84e
f135b64 Switch from goto to do/while colesbury Dec 16, 2025 https://github.com/python/cpython/pull/142599/commits/f135b6434cd827fff5a13101e79890a4d216989e
f532899 Merge branch 'main' into gh-120321-gen-atomic colesbury Dec 17, 2025 https://github.com/python/cpython/pull/142599/commits/f5328993dd5d5c0c941e221153bbef24471e8d9b
4b82b8c Rename field to generator_return_kind colesbury Dec 17, 2025 https://github.com/python/cpython/pull/142599/commits/4b82b8cbe566dae85aaf93ff885e8c861c207475
832e413 Set generator_return_kind in clear_gen_frame colesbury Dec 17, 2025 https://github.com/python/cpython/pull/142599/commits/832e413a9a92a4f3d8abb06ef2ce4326a1aa88c6
f5c10f9 Fix stray typo colesbury Dec 17, 2025 https://github.com/python/cpython/pull/142599/commits/f5c10f952758be86f142e8d5476a67885c6df33a
8a86ce0 Update Objects/genobject.c colesbury Dec 19, 2025 https://github.com/python/cpython/pull/142599/commits/8a86ce00e1b7b1ffdb1140d90ef0968cb97db5ae
a874397 Merge branch 'main' into gh-120321-gen-atomic colesbury Dec 19, 2025 https://github.com/python/cpython/pull/142599/commits/a87439740850d7fa7fb8fece6c29513dceca44b7
Clear filters https://github.com/python/cpython/pull/142599/files
Please reload this pagehttps://github.com/python/cpython/pull/142599/files
Please reload this pagehttps://github.com/python/cpython/pull/142599/files
pyatomic.h https://github.com/python/cpython/pull/142599/files#diff-c94777ecf85ab5b7e6821bfa3adf5589d1c7361af87540dba34102410e6bb2a2
pyatomic_gcc.h https://github.com/python/cpython/pull/142599/files#diff-45b25fca80f994bc7d28644019574fc39b09ebc0010f987b21c82654eb1f6d84
pyatomic_msc.h https://github.com/python/cpython/pull/142599/files#diff-f2c06d131685bfc0f8e2524e3afbc85e75d1b9862f7593d313fae165afd818b6
pyatomic_std.h https://github.com/python/cpython/pull/142599/files#diff-e1c3a00f3e7699eb2f18d9059138eedbcf201d9cd54e6f5da17fbff419cd9af5
pycore_pyatomic_ft_wrappers.h https://github.com/python/cpython/pull/142599/files#diff-ce601684210b2d7f8f955bb70eb6836e92f54d7d0ec6cd87e6d9da2b974ab7f7
pycore_tstate.h https://github.com/python/cpython/pull/142599/files#diff-7d65c03065cc654fe51b92748324dcc062d995c291981e586bba827af6aa7045
pycore_uop_ids.h https://github.com/python/cpython/pull/142599/files#diff-2a420e4d0d58009249c0f73f7c822167b053bd51cb213b20179bd2aebfc66ff9
pycore_uop_metadata.h https://github.com/python/cpython/pull/142599/files#diff-55e65a72fa31e9b746e03076d2c74b716c0c1171663f36960b2339fcbfae9bab
test_generators.py https://github.com/python/cpython/pull/142599/files#diff-2406c63e0187cef5db188397accf64d8b1a72850985cb090b0efd74f67b3dc6c
genobject.c https://github.com/python/cpython/pull/142599/files#diff-2a0c449b68605ebd0872fd232e60ce7e838a77782a6d2e364764f99514fb508a
bytecodes.c https://github.com/python/cpython/pull/142599/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
ceval.c https://github.com/python/cpython/pull/142599/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
ceval_macros.h https://github.com/python/cpython/pull/142599/files#diff-45baf725df91ed7826458cda8a17c2b4a2e5296504de1ed6a1c5a9ebe6390a47
executor_cases.c.h https://github.com/python/cpython/pull/142599/files#diff-a1c3430c42a66c16e6d2e154491a6da993b187b27c628545a12a02c7b2a06b81
generated_cases.c.h https://github.com/python/cpython/pull/142599/files#diff-4ef46fa654f95502e49a24f7dc8ee31a4cac9b3433fe9cd2b2d4dd78cfbad448
analyzer.py https://github.com/python/cpython/pull/142599/files#diff-bf1d5618934b787df486d8077f48217f17bf4321b9a151528f67b6e6f383976b
Include/cpython/pyatomic.hhttps://github.com/python/cpython/pull/142599/files#diff-c94777ecf85ab5b7e6821bfa3adf5589d1c7361af87540dba34102410e6bb2a2
View file https://github.com/colesbury/cpython/blob/a87439740850d7fa7fb8fece6c29513dceca44b7/Include/cpython/pyatomic.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/142599/{{ revealButtonHref }}
https://github.com/python/cpython/pull/142599/files#diff-c94777ecf85ab5b7e6821bfa3adf5589d1c7361af87540dba34102410e6bb2a2
https://github.com/python/cpython/pull/142599/files#diff-c94777ecf85ab5b7e6821bfa3adf5589d1c7361af87540dba34102410e6bb2a2
Include/cpython/pyatomic_gcc.hhttps://github.com/python/cpython/pull/142599/files#diff-45b25fca80f994bc7d28644019574fc39b09ebc0010f987b21c82654eb1f6d84
View file https://github.com/colesbury/cpython/blob/a87439740850d7fa7fb8fece6c29513dceca44b7/Include/cpython/pyatomic_gcc.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/142599/{{ revealButtonHref }}
https://github.com/python/cpython/pull/142599/files#diff-45b25fca80f994bc7d28644019574fc39b09ebc0010f987b21c82654eb1f6d84
https://github.com/python/cpython/pull/142599/files#diff-45b25fca80f994bc7d28644019574fc39b09ebc0010f987b21c82654eb1f6d84
Include/cpython/pyatomic_msc.hhttps://github.com/python/cpython/pull/142599/files#diff-f2c06d131685bfc0f8e2524e3afbc85e75d1b9862f7593d313fae165afd818b6
View file https://github.com/colesbury/cpython/blob/a87439740850d7fa7fb8fece6c29513dceca44b7/Include/cpython/pyatomic_msc.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/142599/{{ revealButtonHref }}
https://github.com/python/cpython/pull/142599/files#diff-f2c06d131685bfc0f8e2524e3afbc85e75d1b9862f7593d313fae165afd818b6
https://github.com/python/cpython/pull/142599/files#diff-f2c06d131685bfc0f8e2524e3afbc85e75d1b9862f7593d313fae165afd818b6
Include/cpython/pyatomic_std.hhttps://github.com/python/cpython/pull/142599/files#diff-e1c3a00f3e7699eb2f18d9059138eedbcf201d9cd54e6f5da17fbff419cd9af5
View file https://github.com/colesbury/cpython/blob/a87439740850d7fa7fb8fece6c29513dceca44b7/Include/cpython/pyatomic_std.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/142599/{{ revealButtonHref }}
https://github.com/python/cpython/pull/142599/files#diff-e1c3a00f3e7699eb2f18d9059138eedbcf201d9cd54e6f5da17fbff419cd9af5
https://github.com/python/cpython/pull/142599/files#diff-e1c3a00f3e7699eb2f18d9059138eedbcf201d9cd54e6f5da17fbff419cd9af5
Include/internal/pycore_pyatomic_ft_wrappers.hhttps://github.com/python/cpython/pull/142599/files#diff-ce601684210b2d7f8f955bb70eb6836e92f54d7d0ec6cd87e6d9da2b974ab7f7
View file https://github.com/colesbury/cpython/blob/a87439740850d7fa7fb8fece6c29513dceca44b7/Include/internal/pycore_pyatomic_ft_wrappers.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/142599/{{ revealButtonHref }}
https://github.com/python/cpython/pull/142599/files#diff-ce601684210b2d7f8f955bb70eb6836e92f54d7d0ec6cd87e6d9da2b974ab7f7
https://github.com/python/cpython/pull/142599/files#diff-ce601684210b2d7f8f955bb70eb6836e92f54d7d0ec6cd87e6d9da2b974ab7f7
https://github.com/python/cpython/pull/142599/files#diff-ce601684210b2d7f8f955bb70eb6836e92f54d7d0ec6cd87e6d9da2b974ab7f7
https://github.com/python/cpython/pull/142599/files#diff-ce601684210b2d7f8f955bb70eb6836e92f54d7d0ec6cd87e6d9da2b974ab7f7
https://github.com/python/cpython/pull/142599/files#diff-ce601684210b2d7f8f955bb70eb6836e92f54d7d0ec6cd87e6d9da2b974ab7f7
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L332
Include/internal/pycore_tstate.hhttps://github.com/python/cpython/pull/142599/files#diff-7d65c03065cc654fe51b92748324dcc062d995c291981e586bba827af6aa7045
View file https://github.com/colesbury/cpython/blob/a87439740850d7fa7fb8fece6c29513dceca44b7/Include/internal/pycore_tstate.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/142599/{{ revealButtonHref }}
https://github.com/python/cpython/pull/142599/files#diff-7d65c03065cc654fe51b92748324dcc062d995c291981e586bba827af6aa7045
https://github.com/python/cpython/pull/142599/files#diff-7d65c03065cc654fe51b92748324dcc062d995c291981e586bba827af6aa7045
Please reload this pagehttps://github.com/python/cpython/pull/142599/files
Please reload this pagehttps://github.com/python/cpython/pull/142599/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.