We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 944b9de commit 7ff1141Copy full SHA for 7ff1141
Rubberduck.Parsing/VBA/RubberduckParser.cs
@@ -12,7 +12,6 @@
12
using System.Diagnostics;
13
using Rubberduck.VBEditor.Extensions;
14
using System.IO;
15
-using System.Linq;
16
using NLog;
17
// ReSharper disable LoopCanBeConvertedToQuery
18
@@ -661,20 +660,10 @@ public void Dispose()
661
660
{
662
State.ParseRequest -= ReparseRequested;
663
664
- if (_cancellationTokens.Any(cts => cts != null))
+ if (_cancellationTokens[0] != null)
665
666
- foreach (var cts in _cancellationTokens.ToList())
667
- {
668
- try
669
670
- cts.Cancel();
671
- cts.Dispose();
672
- }
673
- finally
674
675
- _cancellationTokens.Remove(cts);
676
677
+ _cancellationTokens[0].Cancel();
+ _cancellationTokens[0].Dispose();
678
}
679
680
0 commit comments