--- a/ProcessorScheduler.st Tue Jul 18 15:27:04 2017 +0200
+++ b/ProcessorScheduler.st Tue Jul 18 15:30:59 2017 +0200
@@ -2973,16 +2973,14 @@
(i.e. it will trigger only once).
Returns an ID, which can be used in #removeTimeoutWidthID:"
- |now then wasBlocked id|
-
- wasBlocked := OperatingSystem blockInterrupts.
+ |now then id|
+
now := OperatingSystem getMillisecondTime.
then := OperatingSystem millisecondTimeAdd:now and:delta.
id := self addTimedBlock:aBlock for:aProcess atMilliseconds:then.
- wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
^ id
- "Modified: 23.9.1996 / 14:34:13 / cg"
+ "Modified: / 18-07-2017 / 14:04:31 / cg"
!
addTimedBlock:aBlock for:aProcess afterSeconds:delta
@@ -3141,6 +3139,14 @@
"to support pure-events"
block := timeoutActionArray at:index.
block notNil ifTrue:[
+ false ifTrue:[
+ RecentHomeMethods isNil ifTrue:[
+ RecentHomeMethods := OrderedCollection new.
+ ].
+ RecentHomeMethods add:block homeMethod.
+ RecentHomeMethods size > 30 ifTrue:[ RecentHomeMethods removeFirst ].
+ ].
+
"/ usually (>99%), there is only one single timeout action to call;
"/ avoid creation of an OrderedCollection
firstBlockToEvaluate isNil ifTrue:[
@@ -3241,7 +3247,7 @@
]
].
- "Modified: / 30-07-2013 / 19:33:24 / cg"
+ "Modified: / 18-07-2017 / 15:30:39 / cg"
!
removeTimedBlock:aBlock