ProcessorScheduler.st
changeset 16260 e9d69e63e298
parent 16243 ff556834decb
child 16317 8da5e8858f22
equal deleted inserted replaced
16259:9fe0049439db 16260:e9d69e63e298
  2259 
  2259 
  2260     myDelay := Delay forMilliseconds:(t := TimeSliceInterval).
  2260     myDelay := Delay forMilliseconds:(t := TimeSliceInterval).
  2261     flipFlop := true.
  2261     flipFlop := true.
  2262 
  2262 
  2263     'Processor [info]: timeslicer started' infoPrintCR.
  2263     'Processor [info]: timeslicer started' infoPrintCR.
  2264     [
  2264     [true] whileTrue:[
  2265         t ~~ TimeSliceInterval ifTrue:[
  2265         t ~~ TimeSliceInterval ifTrue:[
  2266             "/ interval changed -> need a new delay
  2266             "/ interval changed -> need a new delay
  2267             myDelay delay:(t := TimeSliceInterval).
  2267             myDelay delay:(t := TimeSliceInterval).
  2268         ].
  2268         ].
  2269         myDelay wait.
  2269         myDelay wait.
  2278                 ].
  2278                 ].
  2279                 scheduledProcesses removeAll.
  2279                 scheduledProcesses removeAll.
  2280             ].
  2280             ].
  2281             scheduledProcesses := IdentitySet new.
  2281             scheduledProcesses := IdentitySet new.
  2282         ].
  2282         ].
  2283     ] loop.
  2283     ].
  2284 ! !
  2284 ! !
  2285 
  2285 
  2286 !ProcessorScheduler methodsFor:'semaphore signalling'!
  2286 !ProcessorScheduler methodsFor:'semaphore signalling'!
  2287 
  2287 
  2288 disableSemaphore:aSemaphore
  2288 disableSemaphore:aSemaphore
  2956 timeoutHandlerProcess
  2956 timeoutHandlerProcess
  2957     (timeoutHandlerProcess isNil or:[timeoutHandlerProcess isDead]) ifTrue:[
  2957     (timeoutHandlerProcess isNil or:[timeoutHandlerProcess isDead]) ifTrue:[
  2958         timeoutHandlerProcess :=
  2958         timeoutHandlerProcess :=
  2959                 [
  2959                 [
  2960                     [
  2960                     [
  2961                         [
  2961                         [true] whileTrue:[
  2962                             [
  2962                             [
  2963                                 self timeoutHandlerProcessLoop
  2963                                 self timeoutHandlerProcessLoop
  2964                             ] on:Exception do:[:ex|
  2964                             ] on:Exception do:[:ex|
  2965                                 "ignore errors, but tell the user"
  2965                                 "ignore errors, but tell the user"
  2966                                 ('ProcessorScheduler [warning]: error while handling timeouts in TimeoutHandlerProcess: ''' , ex description , '''') infoPrintCR.
  2966                                 ('ProcessorScheduler [warning]: error while handling timeouts in TimeoutHandlerProcess: ''' , ex description , '''') infoPrintCR.
  2967 "/                                thisContext fullPrintAll.
  2967 "/                                thisContext fullPrintAll.
  2968                             ].
  2968                             ].
  2969                         ] loop.
  2969                         ].
  2970                     ] ensure:[
  2970                     ] ensure:[
  2971                         timeoutHandlerProcess := nil
  2971                         timeoutHandlerProcess := nil
  2972                     ].
  2972                     ].
  2973                 ] newProcess.
  2973                 ] newProcess.
  2974 
  2974 
  3446 ! !
  3446 ! !
  3447 
  3447 
  3448 !ProcessorScheduler class methodsFor:'documentation'!
  3448 !ProcessorScheduler class methodsFor:'documentation'!
  3449 
  3449 
  3450 version
  3450 version
  3451     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.281 2014-03-07 22:06:55 stefan Exp $'
  3451     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.282 2014-03-17 02:08:04 cg Exp $'
  3452 !
  3452 !
  3453 
  3453 
  3454 version_CVS
  3454 version_CVS
  3455     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.281 2014-03-07 22:06:55 stefan Exp $'
  3455     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.282 2014-03-17 02:08:04 cg Exp $'
  3456 ! !
  3456 ! !
  3457 
  3457 
  3458 
  3458 
  3459 ProcessorScheduler initialize!
  3459 ProcessorScheduler initialize!