René's URL Explorer Experiment


Title: GitHub · Where software is built

Open Graph Title: python/cpython

X Title: python/cpython

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

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

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

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Thread.join() cannot be interrupted by Ctrl+C on Windows","articleBody":"# Bug report\n\n### Bug description:\n\nThe following short program will always run for 10 seconds on Windows, no matter how quickly you press ctrl+C.\n\n```python\nfrom threading import Thread\nimport time\n\nt = Thread(target=time.sleep, args=(10,))\nt.start()\n\ntry:\n    print(\"Joining ...\")\n    t.join()\n    print(\"Joined without exception\")\nexcept KeyboardInterrupt:\n    print(\"Keyboard interrupt\")\n```\n\nThe program does print \"Keyboard interrupt\", so the signal handler does actually get run and the exception gets thrown. It just doesn't interrupt the join. Indeed, if the thread function is changed to one that runs forever then this code would wait forever too.\n\nThe following expanded version, with a custom signal handler, shows that the signal handler is not run until the `join()` completes. (As opposed to the possibility that it runs straight away, but then the `join()` wait resumes before raising the exception. Unlikely I know.)\n\n\u003cdetails\u003e\n\u003csummary\u003eVersion with custom signal handler\u003c/summary\u003e\n\n```python\nimport signal\nfrom threading import Thread\nimport time\n\nstart_time = time.monotonic()\ndef pr(s):\n    print(f\"{time.monotonic() - start_time:.2f} {s}\")\n\ndef sig_handler(signal, frame):\n    pr(\"Ctrl-C\")\n    raise KeyboardInterrupt\n\nsignal.signal(signal.SIGINT, sig_handler)\n\nt = Thread(target=time.sleep, args=(10,))\nt.start()\n\ntry:\n    pr(\"Joining ...\")\n    t.join()\n    pr(\"Joined without exception\")\nexcept KeyboardInterrupt:\n    pr(\"Keyboard interrupt\")\n```\n\nIf ctrl+c is pressed within 10 seconds then this prints:\n```\n0.00 Joining ...\n10.00 Ctrl-C\n10.00 Keyboard interrupt\n```\n\u003c/details\u003e\n\n**Related issues:**\n\n* #66021 ([bpo-21822](https://bugs.python.org/issue21822)) Sounds similar but is about `Thread.join()` not returning even after the thread is actually finished. In contrast, this issue is about wanting `Thread.join()` to complete *before* the thread is finished.\n* #89437 ([bpo-45274](https://bugs.python.org/issue45274)) This is about the same thing; the above issue was marked as a duplicate of this one.\n* #74157 ([bpo-29971](https://bugs.python.org/issue29971)) This looks like it's a similar bug but for a different call (`Lock.acquire()` rather than `Thread.join()`.\n* #89464 ([bpo-45301](https://bugs.python.org/issue45301) This is referenced from the above issues, but I'm not sure of the exact relationship.\n\n[One of the comments](https://github.com/python/cpython/issues/66021#issuecomment-1093658048) on #66021 is about this `Thread.join()` rather than the real topic of that issue, but they are told \"This is a different issue: [bpo-29971](https://bugs.python.org/issue?@action=redirect\u0026bpo=29971). Currently, threading.Lock.acquire() cannot be interrupted by CTRL+C.\" This suggests to me that #74157 is very related to `Thread.join()` not being interruptable. But it's not exactly the same ... because it's marked as fixed and this issue still persists.\n\n### CPython versions tested on:\n\n3.10, 3.12\n\n### Operating systems tested on:\n\nWindows","author":{"url":"https://github.com/james-oldfield-inex","@type":"Person","name":"james-oldfield-inex"},"datePublished":"2025-10-07T10:00:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/139689/cpython/issues/139689"}

route-pattern/:user_id/:repository/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:bce58703-da83-c05c-d08a-9b9699ef0a54
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8D7A:9445B:2BACC48:3AF9849:696AEBAE
html-safe-nonce2aa67ac1237efa0aa9f933bc8239e6c830223dbb0c048e32d2234a204fbbb914
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDdBOjk0NDVCOjJCQUNDNDg6M0FGOTg0OTo2OTZBRUJBRSIsInZpc2l0b3JfaWQiOiIzNzk5OTk2MDAzNjQ5MjUyMjcwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmace22ff0f9e21ee71cec2042f14244dd68501ae175053f5f2664495d263e6389d1
hovercard-subject-tagrepository:81598961
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/issues/139689
twitter:imagehttps://opengraph.githubassets.com/4bdc75ff44f93fff474a15ea6ea0267a6b07f28bf753fc4d6f632a57d2fa7429/python/cpython
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4bdc75ff44f93fff474a15ea6ea0267a6b07f28bf753fc4d6f632a57d2fa7429/python/cpython
og:image:altThe Python programming language. Contribute to python/cpython development by creating an account on GitHub.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
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
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/139689#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F139689
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%2Fissues%2F139689
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%2Fissues%2Fshow&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/139689
Reloadhttps://github.com/python/cpython/issues/139689
Reloadhttps://github.com/python/cpython/issues/139689
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/139689
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/issues/139689
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
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/139689
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/139689
Thread.join() cannot be interrupted by Ctrl+C on Windowshttps://github.com/python/cpython/issues/139689#top
OS-windowshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-windows%22
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/james-oldfield-inex
https://github.com/james-oldfield-inex
james-oldfield-inexhttps://github.com/james-oldfield-inex
on Oct 7, 2025https://github.com/python/cpython/issues/139689#issue-3490798392
[Windows] KeyboardInterrupt during Thread.join hangs that Thread #66021https://github.com/python/cpython/issues/66021
bpo-21822https://bugs.python.org/issue21822
Race condition in Thread._wait_for_tstate_lock() #89437https://github.com/python/cpython/issues/89437
bpo-45274https://bugs.python.org/issue45274
threading.Lock.acquire() not interruptible on Windows #74157https://github.com/python/cpython/issues/74157
bpo-29971https://bugs.python.org/issue29971
pycore_condvar.h: remove Windows conditonal variable emulation, use Windows native conditional variable #89464https://github.com/python/cpython/issues/89464
bpo-45301https://bugs.python.org/issue45301
One of the commentshttps://github.com/python/cpython/issues/66021#issuecomment-1093658048
#66021https://github.com/python/cpython/issues/66021
bpo-29971https://bugs.python.org/issue?@action=redirect&bpo=29971
#74157https://github.com/python/cpython/issues/74157
OS-windowshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-windows%22
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
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.