GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-136003: Skip non-daemon threads when exceptions occur during finalization by ZeroIntensity · Pull Request #139129 · python/cpython

Conversation

@ZeroIntensity

@ZeroIntensity ZeroIntensity commented Sep 18, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

During finalization, we need to mark all non-daemon threads as daemon to quickly shut down threads when sending CTRL^C to the process. This was a minor regression from GH-136004.

  • Issue: Some pre-finalization callbacks can create other callbacks #136003

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ZeroIntensity added 3 commits September 18, 2025 10:07
@ZeroIntensity
Ignore non-daemon threads when KeyboardInterrupt is sent during final…
8f9e675
…ization.
@ZeroIntensity
Add a test case.
2f5073c
@ZeroIntensity
Remove flaky part of test.
34b8b7e
@ZeroIntensity
ZeroIntensity requested a review from ericsnowcurrently as a code owner September 18, 2025 14:23
@ZeroIntensity ZeroIntensity added sprint skip news labels Sep 18, 2025
@github-project-automation github-project-automation Bot added this to Sprint Sep 18, 2025
@github-project-automation github-project-automation Bot moved this to Todo in Sprint Sep 18, 2025
@bedevere-app bedevere-app Bot added the awaiting core review label Sep 18, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Sep 18, 2025
Some pre-finalization callbacks can create other callbacks #136003
Closed
@ZeroIntensity
SKip the test on Windows.
3455f05
ericsnowcurrently
ericsnowcurrently approved these changes Sep 18, 2025
View reviewed changes

@ericsnowcurrently ericsnowcurrently left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I'm still not convinced changing the whence after the fact is good long term but we can address that separately.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot removed the awaiting core review label Sep 18, 2025
@github-project-automation github-project-automation Bot moved this from Todo to In Progress in Sprint Sep 18, 2025
@bedevere-app bedevere-app Bot added the awaiting merge label Sep 18, 2025
@ZeroIntensity
ZeroIntensity merged commit 3eec897 into python:main Sep 18, 2025
@ZeroIntensity
ZeroIntensity deleted the fix-threading-interrupt branch September 18, 2025 20:04
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Sprint Sep 18, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Sep 18, 2025
@ZeroIntensity ZeroIntensity mentioned this pull request Oct 7, 2025
Thread.join() cannot be interrupted by Ctrl+C on Windows #139689
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ericsnowcurrently ericsnowcurrently ericsnowcurrently approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news sprint

Projects

Sprint
Archived in project

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ZeroIntensity @ericsnowcurrently
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.