ProcessorScheduler.st
changeset 14775 fa2e7d4afdef
parent 14771 c85f3f394aae
child 14780 113129e94917
equal deleted inserted replaced
14774:788d94977e4e 14775:fa2e7d4afdef
  2186 startTimeSlicing
  2186 startTimeSlicing
  2187     "start preemptive scheduling (timeSlicing)"
  2187     "start preemptive scheduling (timeSlicing)"
  2188 
  2188 
  2189     timeSliceProcess notNil ifTrue: [^ self].
  2189     timeSliceProcess notNil ifTrue: [^ self].
  2190 
  2190 
  2191     timeSliceNeededSemaphore := Semaphore new.
  2191     timeSliceNeededSemaphore := Semaphore new name:'timeSlice needed'.
  2192 
  2192 
  2193     timeSliceProcess := [
  2193     timeSliceProcess := [
  2194         [
  2194         [
  2195             |myDelay t flipFlop|
  2195             |myDelay t flipFlop|
  2196 
  2196 
  2899     "Modified: / 20-07-2006 / 09:52:27 / cg"
  2899     "Modified: / 20-07-2006 / 09:52:27 / cg"
  2900 !
  2900 !
  2901 
  2901 
  2902 timeoutHandlerProcessLoop
  2902 timeoutHandlerProcessLoop
  2903     "The timeoutHandlerProcess does nothing but wait.
  2903     "The timeoutHandlerProcess does nothing but wait.
  2904      It exists only, so that timeout blocks may be executed its context."
  2904      It exists only, so that timeout blocks may be executed in its context."
  2905 
  2905 
  2906     Semaphore new wait.
  2906     (Semaphore new name:'timeoutHandler') wait.
  2907 ! !
  2907 ! !
  2908 
  2908 
  2909 !ProcessorScheduler methodsFor:'wait hooks'!
  2909 !ProcessorScheduler methodsFor:'wait hooks'!
  2910 
  2910 
  2911 addPreWaitAction:aBlock
  2911 addPreWaitAction:aBlock
  3354 ! !
  3354 ! !
  3355 
  3355 
  3356 !ProcessorScheduler class methodsFor:'documentation'!
  3356 !ProcessorScheduler class methodsFor:'documentation'!
  3357 
  3357 
  3358 version
  3358 version
  3359     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.263 2013-02-08 16:10:17 stefan Exp $'
  3359     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.264 2013-02-08 18:41:42 stefan Exp $'
  3360 !
  3360 !
  3361 
  3361 
  3362 version_CVS
  3362 version_CVS
  3363     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.263 2013-02-08 16:10:17 stefan Exp $'
  3363     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.264 2013-02-08 18:41:42 stefan Exp $'
  3364 ! !
  3364 ! !
  3365 
  3365 
  3366 
  3366 
  3367 ProcessorScheduler initialize!
  3367 ProcessorScheduler initialize!