{{ message }}
bpo-30891: Fix importlib _find_and_load() race condition#2646
Merged
vstinner merged 1 commit intoJul 10, 2017
Merged
Conversation
vstinner
commented
Jul 10, 2017
Member
Author
|
I confirm with my Windows VM that "./python -m test -R 3:100 -m test_concurrency test_import" doesn't fail anymore with this change. |
Sorry, something went wrong.
serhiy-storchaka
approved these changes
Jul 10, 2017
serhiy-storchaka
left a comment
Member
There was a problem hiding this comment.
LGTM except one outdated sentence.
Sorry, something went wrong.
* Rewrite importlib _get_module_lock(): it is now responsible to hold the imp lock directly. * _find_and_load() now holds the module lock to check if name is in sys.modules to prevent a race condition
brettcannon
approved these changes
Jul 10, 2017
vstinner
added a commit
that referenced
this pull request
Jul 10, 2017
* Rewrite importlib _get_module_lock(): it is now responsible to hold the imp lock directly. * _find_and_load() now holds the module lock to check if name is in sys.modules to prevent a race condition (cherry picked from commit 4f9a446)
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
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.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.
the imp lock directly.
sys.modules to prevent a race condition