pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/pull/155478

ull-requests-5f61a10d0c5fd0c3.css" /> gh-155477: Fix multiprocessing.Pool deadlock on close() with a buffersize imap by tonghuaroot · Pull Request #155478 · python/cpython · GitHub
Skip to content

gh-155477: Fix multiprocessing.Pool deadlock on close() with a buffersize imap - #155478

Open
tonghuaroot wants to merge 1 commit into
python:mainfrom
tonghuaroot:fix-pool-buffersize-close
Open

gh-155477: Fix multiprocessing.Pool deadlock on close() with a buffersize imap#155478
tonghuaroot wants to merge 1 commit into
python:mainfrom
tonghuaroot:fix-pool-buffersize-close

Conversation

@tonghuaroot

@tonghuaroot tonghuaroot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

The buffersize variant of Pool.imap()/imap_unordered() throttles the task
generator on a semaphore. close() did not release those semaphores (only
terminate() did), so a partially-consumed iterator left the task handler
blocked in sema.acquire() and join() deadlocked. Release the buffersize
semaphores in close(), and stop the task generator once the pool leaves the
RUN state. Introduced in gh-64192.

…buffersize imap

close() did not release the buffersize semaphores that throttle the task
generator, so a partially-consumed imap left the task handler blocked and
join() deadlocked. Release them in close() and stop the generator once the
pool leaves the RUN state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy