Do not terminate timoutHandler process if an error occures
authorStefan Vogel <sv@exept.de>
Fri, 20 Feb 2009 15:28:10 +0100
changeset 11584 39e6ec350c15
parent 11583 be67d1608cf2
child 11585 0bf923748b73
Do not terminate timoutHandler process if an error occures while processing an timeout.
ProcessorScheduler.st
--- a/ProcessorScheduler.st	Fri Feb 20 15:14:40 2009 +0100
+++ b/ProcessorScheduler.st	Fri Feb 20 15:28:10 2009 +0100
@@ -2881,16 +2881,28 @@
 
 timeoutHandlerProcess
     (timeoutHandlerProcess isNil or:[timeoutHandlerProcess isDead]) ifTrue:[
-	timeoutHandlerProcess :=
-		[
-		    [
-			[true] whileTrue:[self timeoutHandlerProcessLoop]
-		    ] ensure:[ timeoutHandlerProcess := nil ].
-		] newProcess.
-	timeoutHandlerProcess priority:TimingPriority.
-	timeoutHandlerProcess name:'Timeout handler'.
-	timeoutHandlerProcess beSystemProcess.
-	timeoutHandlerProcess resume.
+        timeoutHandlerProcess :=
+                [
+                    [
+                        [true] whileTrue:[
+                            [
+                                self timeoutHandlerProcessLoop
+                            ] on:GenericException do:[:ex|
+                                "ignore errors, but tell the user"
+                                ('ProcessorScheduler [warning]: error while handling timeouts in TimeoutHandlerProcess: ''' , ex description , '''') infoPrintCR.
+"/                                thisContext fullPrintAll.
+                            ].
+                        ] 
+                    ] ensure:[
+                        timeoutHandlerProcess := nil
+                    ].
+                ] newProcess.
+
+        timeoutHandlerProcess 
+            priority:TimingPriority;
+            name:'Timeout handler';
+            beSystemProcess;
+            resume.
     ].
     ^ timeoutHandlerProcess.
 
@@ -3352,7 +3364,7 @@
 !ProcessorScheduler class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.247 2008-10-23 16:26:48 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.248 2009-02-20 14:28:10 stefan Exp $'
 ! !
 
 ProcessorScheduler initialize!