René's URL Explorer Experiment


Title: bpo-32309: Implement asyncio.ThreadPool by aeros · Pull Request #18410 · python/cpython · GitHub

Open Graph Title: bpo-32309: Implement asyncio.ThreadPool by aeros · Pull Request #18410 · python/cpython

X Title: bpo-32309: Implement asyncio.ThreadPool by aeros · Pull Request #18410 · python/cpython

Description: Implements asyncio.ThreadPool, a high-level asynchronous context manager for concurrently running IO-bound functions without blocking the event loop. The initial implementation relies significantly upon loop.run_in_executor(), but the long-term goal is to eventually use a fully native asyncio threadpool (which doesn't rely on concurrent.futures.ThreadPoolExecutor). See the bpo issue for more details. https://bugs.python.org/issue32309 Note: Disregard the name of the branch. It has all of the intended changes, but it seems that I accidentally added the changes on top of branch from my recently merged PR (#18057). This has no consequence though other than a misleading branch name, so I'll leave it as is.

Open Graph Description: Implements asyncio.ThreadPool, a high-level asynchronous context manager for concurrently running IO-bound functions without blocking the event loop. The initial implementation relies significantly...

X Description: Implements asyncio.ThreadPool, a high-level asynchronous context manager for concurrently running IO-bound functions without blocking the event loop. The initial implementation relies significantly...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:ca52238a-4799-6acf-1754-d7d503fd68ed
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBD0A:14F965:353156:471AE4:6A4D9E4C
html-safe-noncebd87eed8e6508f81f97144009892f9aea6491fb71270efcddd3ae1ef9d47cb11
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDBBOjE0Rjk2NTozNTMxNTY6NDcxQUU0OjZBNEQ5RTRDIiwidmlzaXRvcl9pZCI6IjMwMjM1ODI4NDI3MzY5NzU0MzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac1ba7f2be3ffa5219b1739a8c9da1e9188c421804b26caa96ac209ae016c86e2d
hovercard-subject-tagpull_request:372675267
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/18410/files
twitter:imagehttps://avatars.githubusercontent.com/u/44193521?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/44193521?s=400&v=4
og:image:altImplements asyncio.ThreadPool, a high-level asynchronous context manager for concurrently running IO-bound functions without blocking the event loop. The initial implementation relies significantly...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33
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
release7f13faa65cccc9b729d674da83335d5dcfdfd193
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/18410/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F18410%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/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/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/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%2F18410%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/18410/files
Reloadhttps://github.com/python/cpython/pull/18410/files
Reloadhttps://github.com/python/cpython/pull/18410/files
Please reload this pagehttps://github.com/python/cpython/pull/18410/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/18410/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 34.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.6k 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
aeroshttps://github.com/aeros
python:masterhttps://github.com/python/cpython/tree/master
aeros:bpo39349-add-cancel_futures-to-Executor.shutdownhttps://github.com/aeros/cpython/tree/bpo39349-add-cancel_futures-to-Executor.shutdown
Conversation 78 https://github.com/python/cpython/pull/18410
Commits 18 https://github.com/python/cpython/pull/18410/commits
Checks 0 https://github.com/python/cpython/pull/18410/checks
Files changed https://github.com/python/cpython/pull/18410/files
Please reload this pagehttps://github.com/python/cpython/pull/18410/files
bpo-32309: Implement asyncio.ThreadPool https://github.com/python/cpython/pull/18410/files#top
Show all changes 18 commits https://github.com/python/cpython/pull/18410/files
8cc155e Implement asyncio.ThreadPool aeros Nov 16, 2019 https://github.com/python/cpython/pull/18410/commits/8cc155e005cc321b0ce0c755a93ef5b965ccf1fa
323ef09 📜🤖 Added by blurb_it. blurb-it[bot] Feb 8, 2020 https://github.com/python/cpython/pull/18410/commits/323ef09bfd4b01ede50fcf946521a9853551a463
2dc325a Add whatsnew for 3.9 aeros Feb 8, 2020 https://github.com/python/cpython/pull/18410/commits/2dc325a03f3c172b6d6ad2e80a4cbc7104588cd3
bf3e022 Fix asyncio.ThreadPool examples aeros Feb 8, 2020 https://github.com/python/cpython/pull/18410/commits/bf3e022d5334b127b394b6a30070f79758b34641
8b715fe Fix asyncio.ThreadPool example aeros Feb 11, 2020 https://github.com/python/cpython/pull/18410/commits/8b715febce83688b82366cba6244d63a568e5f2c
ccd425f Improve tearDown() in test_pools aeros Feb 13, 2020 https://github.com/python/cpython/pull/18410/commits/ccd425ff81c346dae4e01618933b7514e1b4520c
2dba11d Co-authored-by: Antoine Pitrou aeros Mar 2, 2020 https://github.com/python/cpython/pull/18410/commits/2dba11d3221c81acf00c8cec93ddf12c5a1ba869
fb194ef Fix whitespace aeros Mar 2, 2020 https://github.com/python/cpython/pull/18410/commits/fb194efe37b2183a12a30c8e9dc751571b85e742
1a8a3da Replace "threadpool" with "thread pool" aeros May 14, 2020 https://github.com/python/cpython/pull/18410/commits/1a8a3daecc11cddfb29a94814cb30d415f1019dc
59eb5ce Simplify astart() and aclose() docs aeros May 14, 2020 https://github.com/python/cpython/pull/18410/commits/59eb5ce553e47e5b82e0d679793c95ae43409e2d
00cd86b Allow *func* to be a kwarg for functions passed to run() aeros May 14, 2020 https://github.com/python/cpython/pull/18410/commits/00cd86be3c47dabafcfcd65fc90ccaabe98cee9a
e2df3e5 Apply suggestions from code review aeros May 14, 2020 https://github.com/python/cpython/pull/18410/commits/e2df3e58aeb0f6a6fda4cc1b02f4d699fee3bb0f
70895b9 Add test_run_exception() aeros May 14, 2020 https://github.com/python/cpython/pull/18410/commits/70895b93e51f39c2986af0c1a9d681cc26ab3b2f
245d93e Use run_in_executor() for startup/shutdown instead of seperate thread aeros May 14, 2020 https://github.com/python/cpython/pull/18410/commits/245d93ef8fce0bb92ef54824b0f4a20dcfdcd859
79c6b5b Add missing conversions from 'threadpool' to 'thread pool' aeros May 14, 2020 https://github.com/python/cpython/pull/18410/commits/79c6b5b54ae3a4eec9fcd77147c729c22910dda5
baec428 Add shutdown_default_executor() to tearDown() aeros May 14, 2020 https://github.com/python/cpython/pull/18410/commits/baec4280d935e1fb238e247523f69370ad34b114
25963af Fix ThreadPool.run() function signature aeros May 15, 2020 https://github.com/python/cpython/pull/18410/commits/25963afdadb118b0722b84df635899044b321222
bd29b94 Add shutdown_default_executor to ThreadPoolTests.tearDown() aeros May 15, 2020 https://github.com/python/cpython/pull/18410/commits/bd29b9427aab637fc167e735f127f74341f585d5
Clear filters https://github.com/python/cpython/pull/18410/files
Please reload this pagehttps://github.com/python/cpython/pull/18410/files
Please reload this pagehttps://github.com/python/cpython/pull/18410/files
asyncio-pools.rst https://github.com/python/cpython/pull/18410/files#diff-9881a9aaadfd887438f2672a5806eb53dbb31997875c11ad4e9fb0a13ad0c216
asyncio.rst https://github.com/python/cpython/pull/18410/files#diff-7083e2e62a3a95fa47854b65720054c3b1b455877324c54b347133c5e57dbe80
3.9.rst https://github.com/python/cpython/pull/18410/files#diff-ec874d66bbcf13046b9928aa3716d14a93632f568b914eba32baf46ff4c9eb36
__init__.py https://github.com/python/cpython/pull/18410/files#diff-6d8c6a7b5cda5773cc40309dcfeeeb120b25857274a13aba8f3c803d25397fdf
pools.py https://github.com/python/cpython/pull/18410/files#diff-fcf2fd8c1e6d44c5237a0ccc3a0bad547091522edba19804976ce891e8072251
test_pools.py https://github.com/python/cpython/pull/18410/files#diff-e2596b2c70436a4e22084740a889faffd8b6e715b89bd93d7e0f81ce1bc93309
2020-02-08-03-49-55.bpo-32309.B88xPb.rst https://github.com/python/cpython/pull/18410/files#diff-a0f57de820f057ee3d41d7dbd7fb7942c3af685717100a76f37bbe94dd2079a4
Doc/library/asyncio-pools.rsthttps://github.com/python/cpython/pull/18410/files#diff-9881a9aaadfd887438f2672a5806eb53dbb31997875c11ad4e9fb0a13ad0c216
View file https://github.com/aeros/cpython/blob/bd29b9427aab637fc167e735f127f74341f585d5/Doc/library/asyncio-pools.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/18410/{{ revealButtonHref }}
Please reload this pagehttps://github.com/python/cpython/pull/18410/files
Doc/library/asyncio.rsthttps://github.com/python/cpython/pull/18410/files#diff-7083e2e62a3a95fa47854b65720054c3b1b455877324c54b347133c5e57dbe80
View file https://github.com/aeros/cpython/blob/bd29b9427aab637fc167e735f127f74341f585d5/Doc/library/asyncio.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/18410/{{ revealButtonHref }}
https://github.com/python/cpython/pull/18410/files#diff-7083e2e62a3a95fa47854b65720054c3b1b455877324c54b347133c5e57dbe80
https://github.com/python/cpython/pull/18410/files#diff-7083e2e62a3a95fa47854b65720054c3b1b455877324c54b347133c5e57dbe80
https://github.com/python/cpython/pull/18410/files#diff-7083e2e62a3a95fa47854b65720054c3b1b455877324c54b347133c5e57dbe80
https://github.com/python/cpython/pull/18410/files#diff-7083e2e62a3a95fa47854b65720054c3b1b455877324c54b347133c5e57dbe80
Doc/whatsnew/3.9.rsthttps://github.com/python/cpython/pull/18410/files#diff-ec874d66bbcf13046b9928aa3716d14a93632f568b914eba32baf46ff4c9eb36
View file https://github.com/aeros/cpython/blob/bd29b9427aab637fc167e735f127f74341f585d5/Doc/whatsnew/3.9.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/18410/{{ revealButtonHref }}
https://github.com/python/cpython/pull/18410/files#diff-ec874d66bbcf13046b9928aa3716d14a93632f568b914eba32baf46ff4c9eb36
https://github.com/python/cpython/pull/18410/files#diff-ec874d66bbcf13046b9928aa3716d14a93632f568b914eba32baf46ff4c9eb36
Lib/asyncio/__init__.pyhttps://github.com/python/cpython/pull/18410/files#diff-6d8c6a7b5cda5773cc40309dcfeeeb120b25857274a13aba8f3c803d25397fdf
View file https://github.com/aeros/cpython/blob/bd29b9427aab637fc167e735f127f74341f585d5/Lib/asyncio/__init__.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/18410/{{ revealButtonHref }}
https://github.com/python/cpython/pull/18410/files#diff-6d8c6a7b5cda5773cc40309dcfeeeb120b25857274a13aba8f3c803d25397fdf
https://github.com/python/cpython/pull/18410/files#diff-6d8c6a7b5cda5773cc40309dcfeeeb120b25857274a13aba8f3c803d25397fdf
https://github.com/python/cpython/pull/18410/files#diff-6d8c6a7b5cda5773cc40309dcfeeeb120b25857274a13aba8f3c803d25397fdf
Lib/asyncio/pools.pyhttps://github.com/python/cpython/pull/18410/files#diff-fcf2fd8c1e6d44c5237a0ccc3a0bad547091522edba19804976ce891e8072251
View file https://github.com/aeros/cpython/blob/bd29b9427aab637fc167e735f127f74341f585d5/Lib/asyncio/pools.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/18410/{{ revealButtonHref }}
Please reload this pagehttps://github.com/python/cpython/pull/18410/files
Please reload this pagehttps://github.com/python/cpython/pull/18410/files
Please reload this pagehttps://github.com/python/cpython/pull/18410/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.