This repository has been archived by the owner on Apr 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 133
Fix modules reload leak #182
Closed
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4edb832
Memory
2dd14a5
Merge master
4170b3b
Modules reload
ab05351
Merge branch 'refs2' into ram
b818271
Merge branch 'master' of https://github.com/Microsoft/python-language…
a40ccf9
Merge branch 'master' of https://github.com/Microsoft/python-language…
49affa2
Change error back to message
68847c4
Merge branch 'master' into ram
f3f5292
Merge branch 'master' into ram
5e82116
Merge branch 'master' of https://github.com/Microsoft/python-language…
d7c06d9
Fix protocol type id
da98c14
Fix type ids
b84d9a5
Don't ignore empty value sets (unknown types)
ca6ee8a
PR feedback
96ae479
Even simpler
48822a5
Merge branch 'master' into ram
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,16 +174,16 @@ private async Task LoadKnownTypesAsync(CancellationToken token) { | |
} | ||
|
||
try { | ||
_interpreterFactory.NotifyImportNamesChanged(); | ||
_modules.ReInit(); | ||
_modules.Reload(); | ||
_interpreter.Initialize(this); | ||
|
||
await LoadKnownTypesAsync(token); | ||
|
||
foreach (var mod in _modulesByFilename.Values) { | ||
mod.Clear(); | ||
mod.EnsureModuleVariables(this); | ||
} | ||
|
||
_interpreterFactory.NotifyImportNamesChanged(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Who is listening to this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AstFactory and AstIntepreter, erasing caches |
||
} finally { | ||
_reloadLock.Release(); | ||
} | ||
|
This file contains 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
This file contains 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
This file contains 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
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.
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.
Do we need a lock here?
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.
Code locks on
_userSearchPathImported
operationsThere 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.
I am resolving it on another work with importing/search paths