Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

gh-126743: Wake pending async results when a pool terminates - #162893

Open
qlearzyy wants to merge 3 commits into
python:mainfrom
qlearzyy:codex/gh-126743
Open

qlearzyy wants to merge 3 commits into
python:mainfrom
qlearzyy:codex/gh-126743

Conversation

@qlearzyy

@qlearzyy qlearzyy commented Nov 30, 2026 •

Copy link
Copy Markdown

Fixes #126743.

Changes

  • Wake callers waiting on abandoned asynchronous results when a multiprocessing pool terminates.
  • Prevent deadlocks involving callbacks and overlapping termination.
  • Preserve results that are already being delivered.
  • Add regression tests for termination race conditions.

Testing

  • Windows x64 Debug: 491 tests, 108 skipped, zero failures.
  • Ubuntu: 996 tests, 154 skipped, zero failures.
  • 12 bounded regression rounds passed under both fork and forkserver.

AI disclosure

OpenAI Codex assisted with implementation, testing, and code review.

@qlearzyy
qlearzyy requested a review from gpshead as a code owner November 30, 2026 21:54
@qlearzyy qlearzyy changed the title Codex/gh 126743 gh-126743: Wake pending async results when a pool terminates Nov 30, 2026
@read-the-docs-community

read-the-docs-community Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #36279053 | 📁 Comparing 23db95d against main (846acf1)

  🔍 Preview build  

2 files changed
± library/multiprocessing.html
± whatsnew/changelog.html

@ZeroIntensity ZeroIntensity added the AI-needs-explanation AI-assisted work that needs further explanation and follow up from the contributor label Dec 1, 2026
@bedevere-app

bedevere-app Bot commented Dec 1, 2026

Copy link
Copy Markdown

Thank you for your interest in contributing to Python. This is a community-driven project, and we want it to be a welcoming place to learn and collaborate.

Contributors are responsible for reviewing and understanding what they submit, checking its claims, and being able to explain changes in their own words. This helps reviewers focus on the contribution and leaves more time to support other contributors.

This contribution appears to have been authored with AI assistance. Please explain your contribution in your own words and describe how you checked its correctness.

Please read our guidelines for using AI tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-needs-explanation AI-assisted work that needs further explanation and follow up from the contributor awaiting review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

multiprocessing async .get() hangs if the pool is terminated

2 participants