File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
External/Plugins/ASCompletion Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -513,6 +513,8 @@ static public void RebuildClasspath()
513
513
/// </summary>
514
514
public virtual void ReleaseClasspath ( )
515
515
{
516
+ PathExplorer . BeginUpdate ( ) ;
517
+
516
518
if ( started && classPath != null )
517
519
{
518
520
foreach ( PathModel aPath in classPath ) aPath . InUse = false ;
@@ -529,6 +531,8 @@ public virtual void FinalizeClasspath()
529
531
foreach ( PathModel aPath in classPath ) aPath . InUse = true ;
530
532
}
531
533
PathModel . Compact ( ) ;
534
+
535
+ PathExplorer . EndUpdate ( ) ;
532
536
}
533
537
534
538
/// <summary>
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ static public bool IsWorking
26
26
}
27
27
28
28
static private bool uistarted ;
29
+ static private bool contextUpdating ;
29
30
static private Queue < PathExplorer > waiting = new Queue < PathExplorer > ( ) ;
30
31
static private volatile Thread explorerThread ;
31
32
static private volatile bool stopExploration ;
@@ -69,6 +70,16 @@ static public void ClearAll()
69
70
lock ( waiting ) { waiting . Clear ( ) ; }
70
71
}
71
72
73
+ static public void BeginUpdate ( )
74
+ {
75
+ contextUpdating = true ;
76
+ }
77
+
78
+ static public void EndUpdate ( )
79
+ {
80
+ contextUpdating = false ;
81
+ }
82
+
72
83
static public void ClearPersistentCache ( )
73
84
{
74
85
string cacheDir = GetCachePath ( ) ;
@@ -145,6 +156,12 @@ private static void ExploreInBackground()
145
156
{
146
157
PathExplorer next = null ;
147
158
159
+ if ( contextUpdating )
160
+ {
161
+ Thread . Sleep ( 100 ) ;
162
+ continue ;
163
+ }
164
+
148
165
lock ( waiting )
149
166
{
150
167
if ( waiting . Count > 0 ) next = waiting . Dequeue ( ) ;
You can’t perform that action at this time.
0 commit comments