Process.st
changeset 21463 67a7ff4869e0
parent 21448 59c38b4d195a
child 21668 74cc7095adb7
equal deleted inserted replaced
21462:75671c82df4a 21463:67a7ff4869e0
   934 
   934 
   935     Processor activeProcess == self ifTrue:[
   935     Processor activeProcess == self ifTrue:[
   936         aBlock value
   936         aBlock value
   937     ] ifFalse:[
   937     ] ifFalse:[
   938         self isDead ifTrue:[    
   938         self isDead ifTrue:[    
   939             self error:'trying to register interrupt for dead process'.
   939             "/ trying to register interrupt for dead process.
       
   940             ^ self.
   940         ].    
   941         ].    
   941         self addInterruptAction:aBlock.
   942         self addInterruptAction:aBlock.
   942         Processor scheduleForInterrupt:self.
   943         Processor scheduleForInterrupt:self.
   943     ].
   944     ].
   944 
   945 
   950         p waitUntilTerminated.
   951         p waitUntilTerminated.
   951         p interruptWith:[Transcript showCR:Processor activeProcess].
   952         p interruptWith:[Transcript showCR:Processor activeProcess].
   952     "
   953     "
   953 
   954 
   954     "Modified: / 12-01-1997 / 00:52:05 / cg"
   955     "Modified: / 12-01-1997 / 00:52:05 / cg"
   955     "Modified: / 14-02-2017 / 21:32:18 / stefan"
   956     "Modified: / 16-02-2017 / 18:09:38 / stefan"
   956 !
   957 !
   957 
   958 
   958 onResumeDo:aBlock
   959 onResumeDo:aBlock
   959     "prepare for the receiver to evaluate aBlock when resumed.
   960     "prepare for the receiver to evaluate aBlock when resumed.
   960      This is like #interruptWith:, but does not resume the receiver
   961      This is like #interruptWith:, but does not resume the receiver