René's URL Explorer Experiment


Title: bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). by ericsnowcurrently · Pull Request #11617 · python/cpython · GitHub

Open Graph Title: bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). by ericsnowcurrently · Pull Request #11617 · python/cpython

X Title: bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). by ericsnowcurrently · Pull Request #11617 · python/cpython

Description: This is part of the work to improve isolation between subinterpreters. We need a way for one interpreter to ask another interpreter to do small low-level tasks, like safely decref an object owned by the other interpreter. The existing Py_AddPendingCall() (part of the public C-API) is specific to the main interpreter, so we factor out a private per-interpreter _Py_AddPendingCall(). This involves moving the global "pending calls" state to PyInterpreterState. As part of this change, we start tracking if each interpreter is "active" or finalizing. "Active" means that the interpreter is currently running the eval loop. We also start tracking the per-interpreter "active" thread ID rather than the global "main" thread ID. https://bugs.python.org/issue33608

Open Graph Description: This is part of the work to improve isolation between subinterpreters. We need a way for one interpreter to ask another interpreter to do small low-level tasks, like safely decref an object owned b...

X Description: This is part of the work to improve isolation between subinterpreters. We need a way for one interpreter to ask another interpreter to do small low-level tasks, like safely decref an object owned b...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:5d345b08-ba07-eea8-37be-ee0e83a7ed04
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idEB92:29798E:36A93:49B04:6A521C84
html-safe-noncef04577cce08b8e117c1f9e88943151b3c821c9c6451539c1d80b3feab64d9692
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjkyOjI5Nzk4RTozNkE5Mzo0OUIwNDo2QTUyMUM4NCIsInZpc2l0b3JfaWQiOiI3ODExMzUzMjY4OTQxMTAyMjEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac1d8a95a49f5bf728f878ae5f9de32df40a3a4ef66b4cfdce0672ccbb268d23bf
hovercard-subject-tagpull_request:245966853
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/11617/files
twitter:imagehttps://avatars.githubusercontent.com/u/1152074?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1152074?s=400&v=4
og:image:altThis is part of the work to improve isolation between subinterpreters. We need a way for one interpreter to ask another interpreter to do small low-level tasks, like safely decref an object owned b...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
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
release7aed05249554b889eb33d002851a973eebcc7e91
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/11617/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F11617%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%2F11617%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/11617/files
Reloadhttps://github.com/python/cpython/pull/11617/files
Reloadhttps://github.com/python/cpython/pull/11617/files
Please reload this pagehttps://github.com/python/cpython/pull/11617/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/11617/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
ericsnowcurrentlyhttps://github.com/ericsnowcurrently
python:masterhttps://github.com/python/cpython/tree/master
ericsnowcurrently:pending-callshttps://github.com/ericsnowcurrently/cpython/tree/pending-calls
Conversation 1 https://github.com/python/cpython/pull/11617
Commits 15 https://github.com/python/cpython/pull/11617/commits
Checks 0 https://github.com/python/cpython/pull/11617/checks
Files changed https://github.com/python/cpython/pull/11617/files
Please reload this pagehttps://github.com/python/cpython/pull/11617/files
bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). https://github.com/python/cpython/pull/11617/files#top
Show all changes 15 commits https://github.com/python/cpython/pull/11617/files
95996fb Zero-out PyInterpreterState when initializing. ericsnowcurrently Sep 10, 2018 https://github.com/python/cpython/pull/11617/commits/95996fb56356ec3bb3ba525bbae09f253e1f2771
e33324f Add _PyRuntimeState.main_thread. ericsnowcurrently Sep 15, 2018 https://github.com/python/cpython/pull/11617/commits/e33324ffb060438be54497ee68f75098fddc5f0d
e6f788e Factor out _add_pending_call() and _pop_pending_call(). ericsnowcurrently Dec 4, 2018 https://github.com/python/cpython/pull/11617/commits/e6f788e8ab3d0b4f91983f0f71ead31f82d96fc4
8794b79 Move pending calls from _PyRuntimeState to PyIntepreterState. ericsnowcurrently Jul 13, 2018 https://github.com/python/cpython/pull/11617/commits/8794b79627032fed2b90efb85b3102888e889cf6
0c36b4c Explicitly pass the interpreter to the stateful ceval macros. ericsnowcurrently Sep 10, 2018 https://github.com/python/cpython/pull/11617/commits/0c36b4c159b67b2cb5471e49641fb92ab371e480
01cb55d Add a note about pending calls during interpreter cleanup. ericsnowcurrently Jul 13, 2018 https://github.com/python/cpython/pull/11617/commits/01cb55dcfa4a4a9de59871619fb4b7ad16e655f6
3fd1b0f Use the internal function. ericsnowcurrently Sep 14, 2018 https://github.com/python/cpython/pull/11617/commits/3fd1b0fef76ecd48dc3ba036518cc2f5d9442b66
1160c4d Make any remaining pending calls before shutdown. ericsnowcurrently Sep 15, 2018 https://github.com/python/cpython/pull/11617/commits/1160c4de54e833b0df7a30f1155476f73f6e5b6e
54cc326 Prevent adding pending calls if finalizing. ericsnowcurrently Sep 15, 2018 https://github.com/python/cpython/pull/11617/commits/54cc32622b431369126739c8126801d6e38ba5c0
117a9cf Add a NEWS entry. ericsnowcurrently Sep 15, 2018 https://github.com/python/cpython/pull/11617/commits/117a9cfb7e7bf15b9f0c1e0bbc3fe80a550491b6
4f447cd Optionally lock a pending call to a specific thread. ericsnowcurrently Sep 15, 2018 https://github.com/python/cpython/pull/11617/commits/4f447cd161b5760cb74128630ceaace0fa6a9930
5bd5c80 Move core-only field to end of struct. ericsnowcurrently Feb 1, 2019 https://github.com/python/cpython/pull/11617/commits/5bd5c803efda86b7c3700fc2a97beb0b5e5e083a
32d194a Factor out struct _ceval_interpreter_state. ericsnowcurrently Feb 1, 2019 https://github.com/python/cpython/pull/11617/commits/32d194abb837a052bd25f6f3846993dfdd5d1478
513c658 Add a TODO. ericsnowcurrently Feb 18, 2019 https://github.com/python/cpython/pull/11617/commits/513c65831617ff48588e6f9f3edb47c54be2b7a9
15fd123 Fix PyEval_ReInitThreads(). ericsnowcurrently Feb 23, 2019 https://github.com/python/cpython/pull/11617/commits/15fd1234c6a61d2a4093a043490dba967a317577
Clear filters https://github.com/python/cpython/pull/11617/files
Please reload this pagehttps://github.com/python/cpython/pull/11617/files
Please reload this pagehttps://github.com/python/cpython/pull/11617/files
ceval.h https://github.com/python/cpython/pull/11617/files#diff-ebdfffaf18bedcdb18ef52479aec307e5f9853560ebaabc481808e84458a1400
pycore_ceval.h https://github.com/python/cpython/pull/11617/files#diff-9e7eb7e81667528dfa3a35bbf32fe622d4721c3c71385ea0ea2250abbd15d545
pycore_pystate.h https://github.com/python/cpython/pull/11617/files#diff-76818a128869986e3de4f16dae0257c430008546f04764cd7ad8254abfa5ce83
2018-09-15-12-13-46.bpo-33608.avmvVP.rst https://github.com/python/cpython/pull/11617/files#diff-9180afc508bd25efb07dc85c316ba046bcb38b63d0c8fc078688e29a46cf3aaf
_testcapimodule.c https://github.com/python/cpython/pull/11617/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
signalmodule.c https://github.com/python/cpython/pull/11617/files#diff-99fb04b208835118fdca0d54b76a00c450da3eaff09d2b53e8a03d63bbe88e30
ceval.c https://github.com/python/cpython/pull/11617/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
ceval_gil.h https://github.com/python/cpython/pull/11617/files#diff-a752fe0b500ba9e2a169c27f43c58c1e354039fffa5ad64852e0978006f45660
pylifecycle.c https://github.com/python/cpython/pull/11617/files#diff-69223f5bb01f359a23246afbbf75b45c622e719424418d658674fbb6c2b36fad
pystate.c https://github.com/python/cpython/pull/11617/files#diff-7ac11e526f79b42d6ea9d3592cb99da46775640c69fa5510f4a6de87cced7141
Include/ceval.hhttps://github.com/python/cpython/pull/11617/files#diff-ebdfffaf18bedcdb18ef52479aec307e5f9853560ebaabc481808e84458a1400
View file https://github.com/ericsnowcurrently/cpython/blob/15fd1234c6a61d2a4093a043490dba967a317577/Include/ceval.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/11617/{{ revealButtonHref }}
https://github.com/python/cpython/pull/11617/files#diff-ebdfffaf18bedcdb18ef52479aec307e5f9853560ebaabc481808e84458a1400
https://github.com/python/cpython/pull/11617/files#diff-ebdfffaf18bedcdb18ef52479aec307e5f9853560ebaabc481808e84458a1400
Include/internal/pycore_ceval.hhttps://github.com/python/cpython/pull/11617/files#diff-9e7eb7e81667528dfa3a35bbf32fe622d4721c3c71385ea0ea2250abbd15d545
View file https://github.com/ericsnowcurrently/cpython/blob/15fd1234c6a61d2a4093a043490dba967a317577/Include/internal/pycore_ceval.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/11617/{{ revealButtonHref }}
https://github.com/python/cpython/pull/11617/files#diff-9e7eb7e81667528dfa3a35bbf32fe622d4721c3c71385ea0ea2250abbd15d545
https://github.com/python/cpython/pull/11617/files#diff-9e7eb7e81667528dfa3a35bbf32fe622d4721c3c71385ea0ea2250abbd15d545
https://github.com/python/cpython/pull/11617/files#diff-9e7eb7e81667528dfa3a35bbf32fe622d4721c3c71385ea0ea2250abbd15d545
https://github.com/python/cpython/pull/11617/files#diff-9e7eb7e81667528dfa3a35bbf32fe622d4721c3c71385ea0ea2250abbd15d545
Include/internal/pycore_pystate.hhttps://github.com/python/cpython/pull/11617/files#diff-76818a128869986e3de4f16dae0257c430008546f04764cd7ad8254abfa5ce83
View file https://github.com/ericsnowcurrently/cpython/blob/15fd1234c6a61d2a4093a043490dba967a317577/Include/internal/pycore_pystate.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/11617/{{ revealButtonHref }}
https://github.com/python/cpython/pull/11617/files#diff-76818a128869986e3de4f16dae0257c430008546f04764cd7ad8254abfa5ce83
https://github.com/python/cpython/pull/11617/files#diff-76818a128869986e3de4f16dae0257c430008546f04764cd7ad8254abfa5ce83
https://github.com/python/cpython/pull/11617/files#diff-76818a128869986e3de4f16dae0257c430008546f04764cd7ad8254abfa5ce83
https://github.com/python/cpython/pull/11617/files#diff-76818a128869986e3de4f16dae0257c430008546f04764cd7ad8254abfa5ce83
https://github.com/python/cpython/pull/11617/files#diff-76818a128869986e3de4f16dae0257c430008546f04764cd7ad8254abfa5ce83
https://github.com/python/cpython/pull/11617/files#diff-76818a128869986e3de4f16dae0257c430008546f04764cd7ad8254abfa5ce83
https://github.com/python/cpython/pull/11617/files#diff-76818a128869986e3de4f16dae0257c430008546f04764cd7ad8254abfa5ce83
Misc/NEWS.d/next/Core and Builtins/2018-09-15-12-13-46.bpo-33608.avmvVP.rsthttps://github.com/python/cpython/pull/11617/files#diff-9180afc508bd25efb07dc85c316ba046bcb38b63d0c8fc078688e29a46cf3aaf
View file https://github.com/ericsnowcurrently/cpython/blob/15fd1234c6a61d2a4093a043490dba967a317577/Misc/NEWS.d/next/Core%20and%20Builtins/2018-09-15-12-13-46.bpo-33608.avmvVP.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/11617/{{ revealButtonHref }}
Modules/_testcapimodule.chttps://github.com/python/cpython/pull/11617/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
View file https://github.com/ericsnowcurrently/cpython/blob/15fd1234c6a61d2a4093a043490dba967a317577/Modules/_testcapimodule.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/11617/{{ revealButtonHref }}
https://github.com/python/cpython/pull/11617/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
https://github.com/python/cpython/pull/11617/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
Modules/signalmodule.chttps://github.com/python/cpython/pull/11617/files#diff-99fb04b208835118fdca0d54b76a00c450da3eaff09d2b53e8a03d63bbe88e30
View file https://github.com/ericsnowcurrently/cpython/blob/15fd1234c6a61d2a4093a043490dba967a317577/Modules/signalmodule.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/11617/{{ revealButtonHref }}
https://github.com/python/cpython/pull/11617/files#diff-99fb04b208835118fdca0d54b76a00c450da3eaff09d2b53e8a03d63bbe88e30
https://github.com/python/cpython/pull/11617/files#diff-99fb04b208835118fdca0d54b76a00c450da3eaff09d2b53e8a03d63bbe88e30
https://github.com/python/cpython/pull/11617/files#diff-99fb04b208835118fdca0d54b76a00c450da3eaff09d2b53e8a03d63bbe88e30
https://github.com/python/cpython/pull/11617/files#diff-99fb04b208835118fdca0d54b76a00c450da3eaff09d2b53e8a03d63bbe88e30
https://github.com/python/cpython/pull/11617/files#diff-99fb04b208835118fdca0d54b76a00c450da3eaff09d2b53e8a03d63bbe88e30
Please reload this pagehttps://github.com/python/cpython/pull/11617/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.