René's URL Explorer Experiment


Title: gh-114940: Use fine-grained mutex protection for `PyInterpreterState.threads` by rruuaanng · Pull Request #125561 · python/cpython · GitHub

Open Graph Title: gh-114940: Use fine-grained mutex protection for `PyInterpreterState.threads` by rruuaanng · Pull Request #125561 · python/cpython

X Title: gh-114940: Use fine-grained mutex protection for `PyInterpreterState.threads` by rruuaanng · Pull Request #125561 · python/cpython

Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

Open Graph Description: Issue: Add a Per-Interpreter "HEAD" Lock #114940

X Description: Issue: Add a Per-Interpreter "HEAD" Lock #114940

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:203de60b-172b-a408-8dca-934d2ba5560c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCA2C:6FB13:C21C0:109F12:6A583BE1
html-safe-nonce127ac3339c08a2229691250c4b7362fcd99be9971f0f2e10255a04676ec3edf7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTJDOjZGQjEzOkMyMUMwOjEwOUYxMjo2QTU4M0JFMSIsInZpc2l0b3JfaWQiOiIxOTIyMjQxOTc5ODAwMzcwMTQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacbbc9d205f3c9c8236e2d91cfeedff349477ecf32a4fd37e9f746f71058f579e1
hovercard-subject-tagpull_request:2126676577
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/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/125561/commits
twitter:imagehttps://opengraph.githubassets.com/91f94640d9babbd866886dd3bb1a8e246c0775b93bb4c19777ace8a78bee5448/python/cpython/pull/125561
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/91f94640d9babbd866886dd3bb1a8e246c0775b93bb4c19777ace8a78bee5448/python/cpython/pull/125561
og:image:altIssue: Add a Per-Interpreter "HEAD" Lock #114940
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerruuaanng
hostnamegithub.com
expected-hostnamegithub.com
None5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6
turbo-cache-controlno-cache
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/125561/commits#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F125561%2Fcommits
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%2F125561%2Fcommits
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%2Fcommits&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/125561/commits
Reloadhttps://github.com/python/cpython/pull/125561/commits
Reloadhttps://github.com/python/cpython/pull/125561/commits
Please reload this pagehttps://github.com/python/cpython/pull/125561/commits
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/125561/commits
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
rruuaannghttps://github.com/rruuaanng
python:mainhttps://github.com/python/cpython/tree/main
rruuaanng:_gh114940https://github.com/rruuaanng/cpython/tree/_gh114940
Conversationhttps://github.com/python/cpython/pull/125561
Commits27 (27)https://github.com/python/cpython/pull/125561/commits
Checkshttps://github.com/python/cpython/pull/125561/checks
Files changedhttps://github.com/python/cpython/pull/125561/files
gh-114940: Use fine-grained mutex protection for PyInterpreterState.threadshttps://github.com/python/cpython/pull/125561/commits#top
rruuaannghttps://github.com/rruuaanng
python:mainhttps://github.com/python/cpython/tree/main
rruuaanng:_gh114940https://github.com/rruuaanng/cpython/tree/_gh114940
Add threads.mutex member to PyInterpreStatehttps://github.com/python/cpython/pull/125561/commits/414cfef83fdec3773595d25049a2834d6c428895
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
414cfefhttps://github.com/python/cpython/pull/125561/commits/414cfef83fdec3773595d25049a2834d6c428895
https://github.com/python/cpython/tree/414cfef83fdec3773595d25049a2834d6c428895
Add NEWShttps://github.com/python/cpython/pull/125561/commits/0c815fcffbac16a79c62224408ba41de51cd57ed
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
0c815fchttps://github.com/python/cpython/pull/125561/commits/0c815fcffbac16a79c62224408ba41de51cd57ed
https://github.com/python/cpython/tree/0c815fcffbac16a79c62224408ba41de51cd57ed
Delete Misc/NEWS.d/next/Core_and_Builtins/2024-10-16-11-07-50.gh-issue-114940.Sev-r-.rsthttps://github.com/python/cpython/pull/125561/commits/f5ec949fe1508bd5c55d4861c36aa4b2b3c2c554
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
f5ec949https://github.com/python/cpython/pull/125561/commits/f5ec949fe1508bd5c55d4861c36aa4b2b3c2c554
https://github.com/python/cpython/tree/f5ec949fe1508bd5c55d4861c36aa4b2b3c2c554
Change to current thread mutexhttps://github.com/python/cpython/pull/125561/commits/b595153587c5dae374e941df0fbaae197de8a85c
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
b595153https://github.com/python/cpython/pull/125561/commits/b595153587c5dae374e941df0fbaae197de8a85c
https://github.com/python/cpython/tree/b595153587c5dae374e941df0fbaae197de8a85c
Remove runtime variablehttps://github.com/python/cpython/pull/125561/commits/2378caa766fe43412ba3c8c82d8c86569bcc4ade
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
2378caahttps://github.com/python/cpython/pull/125561/commits/2378caa766fe43412ba3c8c82d8c86569bcc4ade
https://github.com/python/cpython/tree/2378caa766fe43412ba3c8c82d8c86569bcc4ade
HEAD_LOCK change to INTERP_THREAD_LOCKhttps://github.com/python/cpython/pull/125561/commits/9cb2de0dc32de3f9a45c3fd3de5475023f4d28fa
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
9cb2de0https://github.com/python/cpython/pull/125561/commits/9cb2de0dc32de3f9a45c3fd3de5475023f4d28fa
https://github.com/python/cpython/tree/9cb2de0dc32de3f9a45c3fd3de5475023f4d28fa
Merge branch 'main' into _gh114940https://github.com/python/cpython/pull/125561/commits/afbaf0451aff6c5e2800b75ebbd3eebfbbb7d303
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
afbaf04https://github.com/python/cpython/pull/125561/commits/afbaf0451aff6c5e2800b75ebbd3eebfbbb7d303
https://github.com/python/cpython/tree/afbaf0451aff6c5e2800b75ebbd3eebfbbb7d303
HEAD_LOCK change to INTERP_THREAD_LOCKhttps://github.com/python/cpython/pull/125561/commits/29c4ccb9e4e041132ba9bda298130cd65bd0147a
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
29c4ccbhttps://github.com/python/cpython/pull/125561/commits/29c4ccb9e4e041132ba9bda298130cd65bd0147a
https://github.com/python/cpython/tree/29c4ccb9e4e041132ba9bda298130cd65bd0147a
HEAD_LOCK change to INTERP_THREAD_LOCKhttps://github.com/python/cpython/pull/125561/commits/462f97ddaef0d169d611f30edd666c5be4587535
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
462f97dhttps://github.com/python/cpython/pull/125561/commits/462f97ddaef0d169d611f30edd666c5be4587535
https://github.com/python/cpython/tree/462f97ddaef0d169d611f30edd666c5be4587535
Remove unused variablehttps://github.com/python/cpython/pull/125561/commits/8146b6f5c8a59494fde98914f31967b2f7e4a46d
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
8146b6fhttps://github.com/python/cpython/pull/125561/commits/8146b6f5c8a59494fde98914f31967b2f7e4a46d
https://github.com/python/cpython/tree/8146b6f5c8a59494fde98914f31967b2f7e4a46d
Clear unused codehttps://github.com/python/cpython/pull/125561/commits/74cc0605617356c89c5b7de4c94440c66cc788fc
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
74cc060https://github.com/python/cpython/pull/125561/commits/74cc0605617356c89c5b7de4c94440c66cc788fc
https://github.com/python/cpython/tree/74cc0605617356c89c5b7de4c94440c66cc788fc
Change commenthttps://github.com/python/cpython/pull/125561/commits/f30b2b132e4522bd02e2b82cdac02340c46eb86f
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
f30b2b1https://github.com/python/cpython/pull/125561/commits/f30b2b132e4522bd02e2b82cdac02340c46eb86f
https://github.com/python/cpython/tree/f30b2b132e4522bd02e2b82cdac02340c46eb86f
INTERP_THREAD_LOCK rename to INTERP_HEAD_LOCKhttps://github.com/python/cpython/pull/125561/commits/8e0d324777853ba858d14de3e20c3dbc7a320960
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
8e0d324https://github.com/python/cpython/pull/125561/commits/8e0d324777853ba858d14de3e20c3dbc7a320960
https://github.com/python/cpython/tree/8e0d324777853ba858d14de3e20c3dbc7a320960
INTERP_THREAD_LOCK rename to INTERP_HEAD_LOCKhttps://github.com/python/cpython/pull/125561/commits/1f488c7612f640455dc19a253fae533b0639c7b9
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
1f488c7https://github.com/python/cpython/pull/125561/commits/1f488c7612f640455dc19a253fae533b0639c7b9
https://github.com/python/cpython/tree/1f488c7612f640455dc19a253fae533b0639c7b9
INTERP_THREAD_LOCK rename to INTERP_HEAD_LOCKhttps://github.com/python/cpython/pull/125561/commits/c99e44ed6bcc4b5408cca7985a530fa312e756d4
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
c99e44ehttps://github.com/python/cpython/pull/125561/commits/c99e44ed6bcc4b5408cca7985a530fa312e756d4
https://github.com/python/cpython/tree/c99e44ed6bcc4b5408cca7985a530fa312e756d4
Using raw memberhttps://github.com/python/cpython/pull/125561/commits/7ad9c323581ffcd3591c9c49ecf7f0bbe3c32b35
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
7ad9c32https://github.com/python/cpython/pull/125561/commits/7ad9c323581ffcd3591c9c49ecf7f0bbe3c32b35
https://github.com/python/cpython/tree/7ad9c323581ffcd3591c9c49ecf7f0bbe3c32b35
Fix possible race conditionshttps://github.com/python/cpython/pull/125561/commits/2131d69b0fe716cc5d9a67f7d04128219b945f54
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
2131d69https://github.com/python/cpython/pull/125561/commits/2131d69b0fe716cc5d9a67f7d04128219b945f54
https://github.com/python/cpython/tree/2131d69b0fe716cc5d9a67f7d04128219b945f54
INTERP_THREAD_LOCK rename to INTERP_HEAD_LOCKhttps://github.com/python/cpython/pull/125561/commits/7bf9a1cd4e9b0fd2d5e6a7d3f024c3deb2ae5ee7
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
7bf9a1chttps://github.com/python/cpython/pull/125561/commits/7bf9a1cd4e9b0fd2d5e6a7d3f024c3deb2ae5ee7
https://github.com/python/cpython/tree/7bf9a1cd4e9b0fd2d5e6a7d3f024c3deb2ae5ee7
Rollback to unmodifiedhttps://github.com/python/cpython/pull/125561/commits/b947bc9768ae36db01a3d669817b4ef1d68d247d
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
b947bc9https://github.com/python/cpython/pull/125561/commits/b947bc9768ae36db01a3d669817b4ef1d68d247d
https://github.com/python/cpython/tree/b947bc9768ae36db01a3d669817b4ef1d68d247d
Use variablehttps://github.com/python/cpython/pull/125561/commits/46c27098a23012c398781b20ed1c9586dc84caa0
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
46c2709https://github.com/python/cpython/pull/125561/commits/46c27098a23012c398781b20ed1c9586dc84caa0
https://github.com/python/cpython/tree/46c27098a23012c398781b20ed1c9586dc84caa0
Recover asserthttps://github.com/python/cpython/pull/125561/commits/3c208c2505cf22c620b3b9e5b1d3e7b33b2bb248
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
3c208c2https://github.com/python/cpython/pull/125561/commits/3c208c2505cf22c620b3b9e5b1d3e7b33b2bb248
https://github.com/python/cpython/tree/3c208c2505cf22c620b3b9e5b1d3e7b33b2bb248
Add mutex for get_mimalloc_allocated_blockshttps://github.com/python/cpython/pull/125561/commits/2bb60d9a02d35abcd889d16c46fde7522314a0bc
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
2bb60d9https://github.com/python/cpython/pull/125561/commits/2bb60d9a02d35abcd889d16c46fde7522314a0bc
https://github.com/python/cpython/tree/2bb60d9a02d35abcd889d16c46fde7522314a0bc
Add mutex for get_reftotalhttps://github.com/python/cpython/pull/125561/commits/3798bed297d1c56c13fb69a847891924f1802d5a
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
3798bedhttps://github.com/python/cpython/pull/125561/commits/3798bed297d1c56c13fb69a847891924f1802d5a
https://github.com/python/cpython/tree/3798bed297d1c56c13fb69a847891924f1802d5a
Merge branch 'main' into _gh114940https://github.com/python/cpython/pull/125561/commits/5dc1cedcef4332e6c7de7a439c448c7be0a498fc
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
5dc1cedhttps://github.com/python/cpython/pull/125561/commits/5dc1cedcef4332e6c7de7a439c448c7be0a498fc
https://github.com/python/cpython/tree/5dc1cedcef4332e6c7de7a439c448c7be0a498fc
Merge branch 'main' into _gh114940https://github.com/python/cpython/pull/125561/commits/18fbaa071aa778a356caa47ecddaebf93393accd
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
18fbaa0https://github.com/python/cpython/pull/125561/commits/18fbaa071aa778a356caa47ecddaebf93393accd
https://github.com/python/cpython/tree/18fbaa071aa778a356caa47ecddaebf93393accd
add lock to codeobjecthttps://github.com/python/cpython/pull/125561/commits/6257837180fe2485893f559cccfcbb899feebcb6
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
6257837https://github.com/python/cpython/pull/125561/commits/6257837180fe2485893f559cccfcbb899feebcb6
https://github.com/python/cpython/tree/6257837180fe2485893f559cccfcbb899feebcb6
clear ci warninghttps://github.com/python/cpython/pull/125561/commits/4b9a569696aae0c8154a5eb8864df864dd366ac0
https://github.com/rruuaanng
rruuaannghttps://github.com/python/cpython/commits?author=rruuaanng
4b9a569https://github.com/python/cpython/pull/125561/commits/4b9a569696aae0c8154a5eb8864df864dd366ac0
https://github.com/python/cpython/tree/4b9a569696aae0c8154a5eb8864df864dd366ac0
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.