class: ProcessorScheduler
added:
#addTimedBlock:after:
#addTimedBlock:for:after:
--- a/ProcessorScheduler.st Tue May 27 12:49:10 2014 +0200
+++ b/ProcessorScheduler.st Wed May 28 10:53:48 2014 +0200
@@ -2583,6 +2583,19 @@
!ProcessorScheduler methodsFor:'timeout handling'!
+addTimedBlock:aBlock after:timeDuration
+ "add the argument, aBlock to the list of time-scheduled-blocks; to be
+ evaluated after timeDuration. The process which installs this timed
+ block will be interrupted for execution of the block.
+ (if it is running, the interrupt will occur in whatever method it is
+ executing; if it is suspended, it will be resumed).
+ The block will be removed from the timed-block list after evaluation
+ (i.e. it will trigger only once).
+ Returns an ID, which can be used in #removeTimeoutWidthID:"
+
+ ^ self addTimedBlock:aBlock for:activeProcess afterMilliseconds:timeDuration getMilliseconds
+!
+
addTimedBlock:aBlock afterMilliseconds:delta
"add the argument, aBlock to the list of time-scheduled-blocks; to be
evaluated after delta milliseconds. The process which installs this timed
@@ -2629,6 +2642,23 @@
"Modified: 23.9.1996 / 14:34:09 / cg"
!
+addTimedBlock:aBlock for:aProcess after:timeDuration
+ "add the argument, aBlock to the list of time-scheduled-blocks.
+ to be evaluated after timeDuration. aProcess will be interrupted for
+ execution of the block.
+ (if it is running, the interrupt will occur in whatever method it is
+ executing; if it is suspended, it will be resumed).
+ If aProcess is nil, the block will be evaluated by the scheduler itself
+ (which is dangerous - the block should not raise any error conditions).
+ The block will be removed from the timed-block list after evaluation
+ (i.e. it will trigger only once).
+ Returns an ID, which can be used in #removeTimeoutWidthID:"
+
+ ^ self addTimedBlock:aBlock for:aProcess afterMilliseconds:timeDuration getMilliseconds
+
+ "Modified: 23.9.1996 / 14:34:18 / cg"
+!
+
addTimedBlock:aBlock for:aProcess afterMilliseconds:delta
"add the argument, aBlock to the list of time-scheduled-blocks; to be
evaluated after delta milliseconds. The process specified by the argument,
@@ -3442,11 +3472,11 @@
!ProcessorScheduler class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.288 2014-05-16 06:57:39 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.289 2014-05-28 08:53:48 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.288 2014-05-16 06:57:39 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.289 2014-05-28 08:53:48 stefan Exp $'
! !