From c6a9c223be9265f72b042dfcf41aad7006e9f9ba Mon Sep 17 00:00:00 2001 From: MikhailArkhipov Date: Mon, 30 Sep 2019 12:03:05 -0700 Subject: [PATCH 1/2] Remove stale reference --- .../Impl/Microsoft.Python.LanguageServer.csproj | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/LanguageServer/Impl/Microsoft.Python.LanguageServer.csproj b/src/LanguageServer/Impl/Microsoft.Python.LanguageServer.csproj index ca455737f..a33882e0d 100644 --- a/src/LanguageServer/Impl/Microsoft.Python.LanguageServer.csproj +++ b/src/LanguageServer/Impl/Microsoft.Python.LanguageServer.csproj @@ -33,14 +33,6 @@ - - - $(AnalysisReference)/Microsoft.Python.Analysis.Engine.dll - - - PreserveNewest - - From b112aa1201a6c5c552030ca116c774360bb73df6 Mon Sep 17 00:00:00 2001 From: Mikhail Arkhipov Date: Fri, 11 Oct 2019 17:50:58 -0700 Subject: [PATCH 2/2] Restore cancellation --- src/LanguageServer/Impl/Indexing/MostRecentDocumentSymbols.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/LanguageServer/Impl/Indexing/MostRecentDocumentSymbols.cs b/src/LanguageServer/Impl/Indexing/MostRecentDocumentSymbols.cs index e1739af6e..0717f5c0b 100644 --- a/src/LanguageServer/Impl/Indexing/MostRecentDocumentSymbols.cs +++ b/src/LanguageServer/Impl/Indexing/MostRecentDocumentSymbols.cs @@ -70,7 +70,7 @@ public async Task WorkAndSetTcs(Func> GetSymbolsAsync(CancellationToken ct = default) { lock (_syncObj) { - return _fileTcs.Task; + return _fileTcs.Task.WaitAsync(ct); } } @@ -111,6 +111,7 @@ public void Dispose() { } _state = WorkQueueState.FinishedWork; } + _fileCts?.Dispose(); } private async Task> IndexAsync(IDocument doc, CancellationToken indexCt) { @@ -150,6 +151,7 @@ private async Task> ParseAsync(CancellationTok private void RenewTcs() { Check.InvalidOperation(Monitor.IsEntered(_syncObj)); + _fileCts?.Dispose(); _fileCts = new CancellationTokenSource(); _fileTcs = new TaskCompletionSource>(); }