#TUNING by stefan
authorStefan Vogel <sv@exept.de>
Thu, 23 Feb 2017 14:18:39 +0100
changeset 17436 d78205cefc1d
parent 17435 028603ba5dce
child 17437 386cd1c4b555
#TUNING by stefan class: Tools::BrowserList changed: #executeInBackground: do not create a lot of delay objects
Tools__BrowserList.st
--- a/Tools__BrowserList.st	Thu Feb 23 14:16:22 2017 +0100
+++ b/Tools__BrowserList.st	Thu Feb 23 14:18:39 2017 +0100
@@ -1457,15 +1457,15 @@
     |activeProcess watcher done|
 
     activeProcess := Processor activeProcess.
-
     done := false.
 
     watcher :=
         [
-            |wg|
+            |delay|
 
+            delay := Delay forSeconds:0.2.
             [done] whileFalse:[
-                Delay waitForSeconds:0.2.
+                delay wait.
                 self applicationIsActive ifTrue:[
                     activeProcess priority:(Processor userSchedulingPriority).
                     done := true.
@@ -1474,11 +1474,16 @@
         ] fork.
 
     [
-        activeProcess withPriority:(Processor userBackgroundPriority) to:(Processor activePriority) do:aBlock
+        activeProcess 
+            withPriority:(Processor userBackgroundPriority) 
+            to:(Processor activePriority)   
+            do:aBlock
     ] ensure:[ 
         done := true. 
         watcher terminate 
     ].
+
+    "Modified: / 23-02-2017 / 13:57:31 / stefan"
 !
 
 inSlaveMode