ProcSched.st
changeset 3246 092deb605639
parent 3245 863c0a09f5a2
child 3270 fd52c625f87c
equal deleted inserted replaced
3245:863c0a09f5a2 3246:092deb605639
  2265             p := processes at:index.
  2265             p := processes at:index.
  2266             (p isNil or:[p == scheduler or:[PureEventDriven]]) ifTrue:[
  2266             (p isNil or:[p == scheduler or:[PureEventDriven]]) ifTrue:[
  2267                 block value
  2267                 block value
  2268             ] ifFalse:[
  2268             ] ifFalse:[
  2269                 p isDead ifTrue:[
  2269                 p isDead ifTrue:[
       
  2270                     
       
  2271                     "/ a timedBlock for a process which has already terminated
       
  2272                     "/ issue a warning and do not execute it.
       
  2273                     "/ (exeuting here may be dangerous, since it would run at scheduler priority here,
       
  2274                     "/  and thereby could block the whole smalltalk system.
       
  2275                     "/  For this reason is it IGNORED here.)
       
  2276                     
  2270                     ('ProcessorScheduler [warning]: cannot evaluate timedBlock for dead process: ''' , p name , '''') infoPrintCR.
  2277                     ('ProcessorScheduler [warning]: cannot evaluate timedBlock for dead process: ''' , p name , '''') infoPrintCR.
  2271                     ('ProcessorScheduler [warning]: the timedBlock is: ' , block displayString) infoPrintCR.
  2278                     ('ProcessorScheduler [warning]: the timedBlock is: ' , block displayString) infoPrintCR.
  2272                 ] ifFalse:[
  2279                 ] ifFalse:[
  2273                     p interruptWith:block
  2280                     p interruptWith:block
  2274                 ]
  2281                 ]
  2275             ]
  2282             ]
  2276         ]
  2283         ]
  2277     ]
  2284     ]
  2278 
  2285 
  2279     "Modified: / 29.1.1998 / 17:02:25 / cg"
  2286     "Modified: / 29.1.1998 / 17:05:03 / cg"
  2280 !
  2287 !
  2281 
  2288 
  2282 removeTimedBlock:aBlock
  2289 removeTimedBlock:aBlock
  2283     "remove the argument, aBlock from the list of time-sceduled-blocks."
  2290     "remove the argument, aBlock from the list of time-sceduled-blocks."
  2284 
  2291 
  2611 ! !
  2618 ! !
  2612 
  2619 
  2613 !ProcessorScheduler class methodsFor:'documentation'!
  2620 !ProcessorScheduler class methodsFor:'documentation'!
  2614 
  2621 
  2615 version
  2622 version
  2616     ^ '$Header: /cvs/stx/stx/libbasic/Attic/ProcSched.st,v 1.142 1998-01-29 16:03:01 cg Exp $'
  2623     ^ '$Header: /cvs/stx/stx/libbasic/Attic/ProcSched.st,v 1.143 1998-01-29 16:05:21 cg Exp $'
  2617 ! !
  2624 ! !
  2618 ProcessorScheduler initialize!
  2625 ProcessorScheduler initialize!