gh-109917: Fix concurrent.future ProcessPoolExecutor locks#110137
Closed
vstinner wants to merge 4 commits intopython:mainfrom
Closed
gh-109917: Fix concurrent.future ProcessPoolExecutor locks#110137vstinner wants to merge 4 commits intopython:mainfrom
vstinner wants to merge 4 commits intopython:mainfrom
Conversation
…p.wakeup() Replace test_gh105829_should_not_deadlock_if_wakeup_pipe_full() test which was mocking too many concurrent.futures internals with a new test_wakeup() functional test. Co-Authored-By: elfstrom <elfstrom@users.noreply.github.com>
Add a lock to _ThreadWakeup which is used internally by _ThreadWakeup methods to serialize method calls to make the API thread safe. No longer use the shutdown lock to access _ThreadWakeup.
Member
Author
|
@elfstrom @tomMoral: This change address the issue described by @elfstrom in #109917 (comment). This PR is based on PR gh-110129. I would prefer to first merge PR gh-110129 fix, and then see if this additional lock makes things safer... or worse :-) For me it's suspicious that the code is full of looooong comments explaining that: "please trust me, no lock is needed because (...). it /should/ be ok...". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.