Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Lock document content #1227

Merged
merged 1 commit into from
Jun 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/Analysis/Ast/Impl/Modules/PythonModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,14 @@ protected virtual void Dispose(bool disposing) {
/// <summary>
/// Returns module content (code).
/// </summary>
public string Content => _buffer.Text;
public string Content {
get {
lock (AnalysisLock) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems spooky to me since Reset uses Content under AnalysisLock, but I guess if that's how C# locks work...

return _buffer.Text;
}
}
}

#endregion

#region Parsing
Expand Down