File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change 33using System . Diagnostics ;
44using System . IO ;
55using System . Linq ;
6+ using System . Threading ;
67using System . Threading . Tasks ;
78using Microsoft . CodeAnalysis ;
89using Microsoft . CodeAnalysis . CSharp ;
@@ -23,8 +24,6 @@ public class Analyser : IDisposable
2324 private protected Entities . Compilation ? compilationEntity ;
2425 private IDisposable ? compilationTrapFile ;
2526
26- private readonly object progressMutex = new object ( ) ;
27-
2827 // The bulk of the extraction work, potentially executed in parallel.
2928 protected readonly List < Action > extractionTasks = new List < Action > ( ) ;
3029 private int taskCount = 0 ;
@@ -242,8 +241,6 @@ private void DoAnalyseCompilation()
242241 try
243242 {
244243 var assemblyPath = extractor . OutputPath ;
245-
246-
247244 var stopwatch = new Stopwatch ( ) ;
248245 stopwatch . Start ( ) ;
249246 var currentTaskId = IncrementTaskCount ( ) ;
@@ -298,10 +295,7 @@ private static void AnalyseNamespace(Context cx, INamespaceSymbol ns)
298295
299296 private int IncrementTaskCount ( )
300297 {
301- lock ( progressMutex )
302- {
303- return ++ taskCount ;
304- }
298+ return Interlocked . Increment ( ref taskCount ) ;
305299 }
306300
307301 private void ReportProgressTaskStarted ( int currentCount , string src )
You can’t perform that action at this time.
0 commit comments