# HG changeset patch # User Claus Gittinger # Date 1478203577 -3600 # Node ID b1e9ec00e8afc4dfc9682f431b299d69dc642e54 # Parent e2a745bdd401f0466bad8efb70112a34bac123e4 #DOCUMENTATION by cg class: ProcessorScheduler comment/format in: #dispatchLoop diff -r e2a745bdd401 -r b1e9ec00e8af ProcessorScheduler.st --- a/ProcessorScheduler.st Thu Nov 03 20:29:30 2016 +0100 +++ b/ProcessorScheduler.st Thu Nov 03 21:06:17 2016 +0100 @@ -842,8 +842,8 @@ "avoid confusion if entered twice" dispatching == true ifTrue:[ - 'Processor [info]: already in dispatch' infoPrintCR. - ^ self + 'Processor [info]: already in dispatch' infoPrintCR. + ^ self ]. dispatching := true. @@ -852,35 +852,43 @@ "/ (thanks to stefans objectAllocation monitor, "/ this safes a bit of memory allocation in the scheduler) - dispatchAction := [ [dispatching] whileTrue:[ self dispatch ] ]. - - handlerAction := [:ex | - (HaltInterrupt accepts:ex creator) ifTrue:[ - "/ in a standalone application, we do not want those - Smalltalk isStandAloneApp ifTrue:[ - Smalltalk isStandAloneDebug ifFalse:[ - ('Processor [info]: ignored (', ex creator printString, ')') infoPrintCR. - ex proceed. - ] - ]. - ]. - - ('Processor [info]: caught (and ignored) signal (', ex creator printString, ')') infoPrintCR. - ex return - ]. + dispatchAction := + [ + [dispatching] whileTrue:[ + self dispatch + ] + ]. + + handlerAction := + [:ex | + (HaltInterrupt accepts:ex creator) ifTrue:[ + "/ in a standalone application, we do not want those + Smalltalk isStandAloneApp ifTrue:[ + Smalltalk isStandAloneDebug ifFalse:[ + ('Processor [info]: ignored (', ex creator printString, ')') infoPrintCR. + ex proceed. + ] + ]. + ]. + + ('Processor [info]: caught (and ignored) signal (', ex creator printString, ')') infoPrintCR. + ex return + ]. ignoredSignals := SignalSet - with:HaltInterrupt - with:TerminateProcessRequest - with:RecursionError - with:AbortAllOperationRequest. + with:HaltInterrupt + with:TerminateProcessRequest + with:RecursionError + with:AbortAllOperationRequest. "/ "/ I made this an extra call to dispatch; this allows recompilation "/ of the dispatch-handling code in the running system. "/ [dispatching] whileTrue:[ - ignoredSignals handle:handlerAction do:dispatchAction + ignoredSignals + handle:handlerAction + do:dispatchAction ]. "/ we arrive here in standalone Apps,