run the indicator update process with a prio-range,
authorClaus Gittinger <cg@exept.de>
Mon, 28 Sep 1998 11:58:57 +0200
changeset 1155 ff5b146ca277
parent 1154 41d487404200
child 1156 6fa33dc93509
run the indicator update process with a prio-range, to ensure it makes some progress.
SelInTree.st
SelectionInTree.st
--- a/SelInTree.st	Mon Sep 28 11:58:07 1998 +0200
+++ b/SelInTree.st	Mon Sep 28 11:58:57 1998 +0200
@@ -735,19 +735,25 @@
     |index|
 
     accessLock critical:[
+        |prio|
+
         index := indicatorList identityIndexOf:aNode.
 
         index ~~ 0 ifTrue:[
             indicatorList removeIndex:index.    "/ reorganize list to be faster
         ].
-        indicatorList addFirst:aNode.
+        indicatorList addLast: "addFirst:" aNode.
 
         indicatorTask isNil ifTrue:[
+            prio := Processor activePriority.
             indicatorTask := [
                 [ self taskCycle ] whileTrue:[ Processor yield ]
-            ] forkAt:(Processor activePriority - 1)
+            ] forkAt:(prio - 1).
+            indicatorTask priorityRange:(prio-1 to:prio).
         ]
     ].
+
+    "Modified: / 26.9.1998 / 15:20:44 / cg"
 !
 
 stopIndicatorValidationFor:aNodeOrList
@@ -774,8 +780,11 @@
 !
 
 taskCycle
-    "run one cycle
-    "
+    "run one cycle fetching indicator state.
+     This is done in the background to avoid long startup
+     delays, in case the indicator information takes long to
+     gather (i.e. when reading directories)"
+
     |node|
 
     accessLock critical:[
@@ -798,11 +807,11 @@
     ].
     ^ true
 
-    "Modified: / 24.9.1998 / 21:13:24 / cg"
+    "Modified: / 26.9.1998 / 15:11:16 / cg"
 ! !
 
 !SelectionInTree class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/Attic/SelInTree.st,v 1.16 1998-09-24 20:09:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/Attic/SelInTree.st,v 1.17 1998-09-28 09:58:57 cg Exp $'
 ! !
--- a/SelectionInTree.st	Mon Sep 28 11:58:07 1998 +0200
+++ b/SelectionInTree.st	Mon Sep 28 11:58:57 1998 +0200
@@ -735,19 +735,25 @@
     |index|
 
     accessLock critical:[
+        |prio|
+
         index := indicatorList identityIndexOf:aNode.
 
         index ~~ 0 ifTrue:[
             indicatorList removeIndex:index.    "/ reorganize list to be faster
         ].
-        indicatorList addFirst:aNode.
+        indicatorList addLast: "addFirst:" aNode.
 
         indicatorTask isNil ifTrue:[
+            prio := Processor activePriority.
             indicatorTask := [
                 [ self taskCycle ] whileTrue:[ Processor yield ]
-            ] forkAt:(Processor activePriority - 1)
+            ] forkAt:(prio - 1).
+            indicatorTask priorityRange:(prio-1 to:prio).
         ]
     ].
+
+    "Modified: / 26.9.1998 / 15:20:44 / cg"
 !
 
 stopIndicatorValidationFor:aNodeOrList
@@ -774,8 +780,11 @@
 !
 
 taskCycle
-    "run one cycle
-    "
+    "run one cycle fetching indicator state.
+     This is done in the background to avoid long startup
+     delays, in case the indicator information takes long to
+     gather (i.e. when reading directories)"
+
     |node|
 
     accessLock critical:[
@@ -798,11 +807,11 @@
     ].
     ^ true
 
-    "Modified: / 24.9.1998 / 21:13:24 / cg"
+    "Modified: / 26.9.1998 / 15:11:16 / cg"
 ! !
 
 !SelectionInTree class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInTree.st,v 1.16 1998-09-24 20:09:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInTree.st,v 1.17 1998-09-28 09:58:57 cg Exp $'
 ! !