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

Commit

Permalink
Merge pull request #84 from AlexanderSher/master
Browse files Browse the repository at this point in the history
Fix #68: System.ObjectDisposedException: PriorityProducerConsumer`1 instance is disposed
  • Loading branch information
AlexanderSher authored Sep 11, 2018
2 parents 9c15c5c + 86e3c81 commit 191d34c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Analysis/Engine/Impl/Intellisense/AnalysisQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ private async Task HandleAnalyzable(IAnalyzable item, AnalysisPriority priority,
if (item is IGroupableAnalysisProjectEntry groupable) {
var added = _enqueuedGroups.Add(groupable.AnalysisGroup);
if (added) {
Enqueue(new GroupAnalysis(groupable.AnalysisGroup, this), priority);
try {
Enqueue(new GroupAnalysis(groupable.AnalysisGroup, this), priority);
} catch (ObjectDisposedException) when (_ppc.IsDisposed) {
return;
}
}

groupable.Analyze(cancellationToken, true);
Expand Down

0 comments on commit 191d34c

Please sign in to comment.