MemoryMonitorView.st
changeset 8655 c79fd17ad0a1
parent 8650 9c4626c21c7b
child 9542 279e4be4e515
--- a/MemoryMonitorView.st	Mon Jun 15 08:30:00 2009 +0200
+++ b/MemoryMonitorView.st	Mon Jun 15 10:00:45 2009 +0200
@@ -620,15 +620,21 @@
     updateBlock notNil ifTrue:[
         Processor addTimedBlock:updateBlock afterSeconds:updateInterval.
     ] ifFalse:[
-        myProcess := [
-            self updateProcess
-        ] newProcess.
-        myProcess priorityRange:(6 to:8).
-        myProcess name:'monitor [' , 
-                       Processor activeProcessId printString ,
-                       '] update'.
-        myProcess restartable:true.
-        myProcess resume.
+        (myProcess isNil or:[myProcess isDead]) ifTrue:[
+            myProcess := [
+                [
+                    self updateProcess
+                ] ensure:[
+                    myProcess := nil.
+                ].
+            ] newProcess.
+            myProcess priorityRange:(6 to:8).
+            myProcess name:'monitor [' , 
+                           Processor activeProcessId printString ,
+                           '] update'.
+            myProcess restartable:true.
+            myProcess resume.
+        ].
     ].
 
     newColor := newColor onDevice:device.
@@ -969,5 +975,5 @@
 !MemoryMonitorView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/MemoryMonitorView.st,v 1.10 2009-06-14 07:33:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/MemoryMonitorView.st,v 1.11 2009-06-15 08:00:45 ca Exp $'
 ! !