René's URL Explorer Experiment


Title: gh-128002: fix many thread safety issues in asyncio by kumaraditya303 · Pull Request #128147 · python/cpython · GitHub

Open Graph Title: gh-128002: fix many thread safety issues in asyncio by kumaraditya303 · Pull Request #128147 · python/cpython

X Title: gh-128002: fix many thread safety issues in asyncio by kumaraditya303 · Pull Request #128147 · python/cpython

Description: Changes: Makes _asyncio.Task and _asyncio.Future thread-safe by adding critical sections Add assertions to check for thread safety checking locking of object by critical sections in internal functions Make _asyncio.all_tasks thread safe when eager tasks are used Change asyncio state lock to a mutex rather than critical section to fix re-entrancy crash, not really sure about this one Add a thread safety test Issue: gh-128002

Open Graph Description: Changes: Makes _asyncio.Task and _asyncio.Future thread-safe by adding critical sections Add assertions to check for thread safety checking locking of object by critical sections in internal funct...

X Description: Changes: Makes _asyncio.Task and _asyncio.Future thread-safe by adding critical sections Add assertions to check for thread safety checking locking of object by critical sections in internal funct...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:31e80f8a-0b14-f0d4-e4ec-7722ecf0ae53
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDBBA:323DD4:26B4F41:34919E1:696ADDCB
html-safe-nonce97fef6d5f388832a95a8e9d5357684b70aa0969800ad8d7e9c33a81d13dc0d34
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQkJBOjMyM0RENDoyNkI0RjQxOjM0OTE5RTE6Njk2QUREQ0IiLCJ2aXNpdG9yX2lkIjoiOTE0MDI1OTM2NjI2OTI3OTY5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd5ac69bb86fe2e9946e8f22cf88d7f78fbc6abd743e8511d966a511c280f86bb
hovercard-subject-tagpull_request:2247707781
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/128147/files
twitter:imagehttps://avatars.githubusercontent.com/u/59607654?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/59607654?s=400&v=4
og:image:altChanges: Makes _asyncio.Task and _asyncio.Future thread-safe by adding critical sections Add assertions to check for thread safety checking locking of object by critical sections in internal funct...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
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
release524a93f2c1f36522a3b4be4c110467ee4172245d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/128147/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F128147%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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%2F128147%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/128147/files
Reloadhttps://github.com/python/cpython/pull/128147/files
Reloadhttps://github.com/python/cpython/pull/128147/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/128147/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k 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.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/128147/files
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 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
kumaraditya303https://github.com/kumaraditya303
python:mainhttps://github.com/python/cpython/tree/main
kumaraditya303:asyncio-tsafehttps://github.com/kumaraditya303/cpython/tree/asyncio-tsafe
Conversation 23 https://github.com/python/cpython/pull/128147
Commits 26 https://github.com/python/cpython/pull/128147/commits
Checks 39 https://github.com/python/cpython/pull/128147/checks
Files changed 3 https://github.com/python/cpython/pull/128147/files
gh-128002: fix many thread safety issues in asyncio https://github.com/python/cpython/pull/128147/files#top
Show all changes 26 commits https://github.com/python/cpython/pull/128147/files
f3642ae fix thread safety kumaraditya303 Dec 21, 2024 https://github.com/python/cpython/pull/128147/commits/f3642ae527734d5bc41ea6f09358562eff5a1fc1
1f63b9e keep working kumaraditya303 Dec 21, 2024 https://github.com/python/cpython/pull/128147/commits/1f63b9e0c0166f0d21ec7f8256744980301c4422
26e9932 keep working kumaraditya303 Dec 21, 2024 https://github.com/python/cpython/pull/128147/commits/26e9932726b94fc5cd1d4d5817ed5366f220ba23
4381ae2 fix refcounting kumaraditya303 Dec 21, 2024 https://github.com/python/cpython/pull/128147/commits/4381ae26b959ef355e4020fecbd6e47019f4cabe
b972121 fix refcounting kumaraditya303 Dec 21, 2024 https://github.com/python/cpython/pull/128147/commits/b97212152e799bc9bcbc1605d91d6da755a68583
eeb0273 add asserts kumaraditya303 Dec 21, 2024 https://github.com/python/cpython/pull/128147/commits/eeb0273aab55308966dddc4aa162fd1731413d45
fd1b9cd more asserts kumaraditya303 Dec 21, 2024 https://github.com/python/cpython/pull/128147/commits/fd1b9cd16be8f9505dd509bac54a5f05f1ab3d77
b628463 more asserts kumaraditya303 Dec 23, 2024 https://github.com/python/cpython/pull/128147/commits/b62846305cd4e915325c1a70cb9c3082e58628db
501b6bb Merge branch 'main' of https://github.com/python/cpython into asyncio… kumaraditya303 Dec 23, 2024 https://github.com/python/cpython/pull/128147/commits/501b6bb0da5f6d81bcb841b4bd500c33033aedf4
86448af fix test kumaraditya303 Dec 23, 2024 https://github.com/python/cpython/pull/128147/commits/86448af5e7df6e469929e7b575a8f19e960ad3e8
303bd9a Merge branch 'main' of https://github.com/python/cpython into asyncio… kumaraditya303 Dec 25, 2024 https://github.com/python/cpython/pull/128147/commits/303bd9ada320acbec5985a5cd26b5a13d6e98e64
0e4a775 fix crash by using mutex instead of critical_section kumaraditya303 Dec 25, 2024 https://github.com/python/cpython/pull/128147/commits/0e4a7755ba21819c63664e258cd228fe23c2f245
1cb3a6f fix all_tasks and use critical section as before kumaraditya303 Dec 31, 2024 https://github.com/python/cpython/pull/128147/commits/1cb3a6f23e59ee470eaa095b2221b0b28b8dcb1b
195c87d add supressions kumaraditya303 Dec 31, 2024 https://github.com/python/cpython/pull/128147/commits/195c87d32c925785f05c1ad08a5be6d51427283b
49f3393 Merge branch 'main' of https://github.com/python/cpython into asyncio… kumaraditya303 Dec 31, 2024 https://github.com/python/cpython/pull/128147/commits/49f339399d71afc25f0e5f9dee0cb3fbb18414ca
847da18 remove suppressions for sockets, it is fixed now kumaraditya303 Jan 1, 2025 https://github.com/python/cpython/pull/128147/commits/847da186345d79ed53e97edccf6cadc1409cd849
41a86a6 merge fixes for socket kumaraditya303 Jan 1, 2025 https://github.com/python/cpython/pull/128147/commits/41a86a66d2b326fef12cbeb8497f418cf97c378f
2ff2af4 add link to issue in suppressions kumaraditya303 Jan 2, 2025 https://github.com/python/cpython/pull/128147/commits/2ff2af42370c102d9b5586d044e433505d0d125a
5411a44 use list as temp storage for tasks before filtering kumaraditya303 Jan 2, 2025 https://github.com/python/cpython/pull/128147/commits/5411a449dec631a9ae199ec7f6065182523b90a4
1afac5f fix FutureIter_am_send_lock_held kumaraditya303 Jan 2, 2025 https://github.com/python/cpython/pull/128147/commits/1afac5f688105220996f6b039214c0c2d2883efe
606ef5c make it->future immutable kumaraditya303 Jan 2, 2025 https://github.com/python/cpython/pull/128147/commits/606ef5cb785bf4f84d9c92e27ef575670c515aff
f2ea4c6 Merge branch 'main' of https://github.com/python/cpython into asyncio… kumaraditya303 Jan 3, 2025 https://github.com/python/cpython/pull/128147/commits/f2ea4c6ab65a5018c0e35a7e012f1913e8e1a760
8bd0da7 remove unnecessary incref/decref of task kumaraditya303 Jan 3, 2025 https://github.com/python/cpython/pull/128147/commits/8bd0da7fa186bbea81e759aad3e364bec3755e01
5030cc6 remove suppressions kumaraditya303 Jan 4, 2025 https://github.com/python/cpython/pull/128147/commits/5030cc6333ef89bdea5db05e59e46fad30cf358d
2676957 fix comment kumaraditya303 Jan 4, 2025 https://github.com/python/cpython/pull/128147/commits/26769576794a08d5ddbcea6b6f55ec079f4e48e4
6e60222 Update Tools/tsan/suppressions_free_threading.txt kumaraditya303 Jan 4, 2025 https://github.com/python/cpython/pull/128147/commits/6e60222bed43f94eeb69478c4fcc9fa4f79e0c66
Clear filters https://github.com/python/cpython/pull/128147/files
Please reload this pagehttps://github.com/python/cpython/pull/128147/files
Please reload this pagehttps://github.com/python/cpython/pull/128147/files
test_free_threading.py https://github.com/python/cpython/pull/128147/files#diff-b89972b25cde443d8f01dc4e5bed054e3ea65959e5c76372524acc231f6a2da0
_asynciomodule.c https://github.com/python/cpython/pull/128147/files#diff-6bd9e39980b88a721d902bcd915bbb3f24762f7f253430c45e52c42a2c5afd01
_asynciomodule.c.h https://github.com/python/cpython/pull/128147/files#diff-a19e0541aa4b8b56146c5d6e761608df7f2e8afeffaa8c3af930b17f25901a3c
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L370
Lib/test/test_asyncio/test_free_threading.pyhttps://github.com/python/cpython/pull/128147/files#diff-b89972b25cde443d8f01dc4e5bed054e3ea65959e5c76372524acc231f6a2da0
View file https://github.com/kumaraditya303/cpython/blob/6e60222bed43f94eeb69478c4fcc9fa4f79e0c66/Lib/test/test_asyncio/test_free_threading.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/128147/{{ revealButtonHref }}
Please reload this pagehttps://github.com/python/cpython/pull/128147/files
Please reload this pagehttps://github.com/python/cpython/pull/128147/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.