[squeak-dev] The Trunk: Morphic-bf.624.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Sep 12 15:48:40 UTC 2012

Bert Freudenberg uploaded a new version of Morphic to project The Trunk:

==================== Summary ====================

Name: Morphic-bf.624
Author: bf
Time: 12 September 2012, 5:47:14.352 pm
UUID: 2b4cb6c4-49df-4186-b43d-2c3c6cf7fd1b
Ancestors: Morphic-ul.623

Do not freeze when an alarm callback raises an error. Thanks to John McKeon for finding the cause!

=============== Diff against Morphic-ul.623 ===============

Item was changed:
  ----- Method: WorldState>>triggerAlarmsBefore: (in category 'alarms') -----
  triggerAlarmsBefore: nowTime
  	"Trigger all pending alarms that are to be executed before nowTime."
+ 	| triggered |
  	lastAlarmTime ifNil:[lastAlarmTime := nowTime].
  	(nowTime < lastAlarmTime or:[nowTime - lastAlarmTime > 10000])
  		ifTrue:[self adjustAlarmTimes: nowTime].
+ 	triggered := OrderedCollection new.
  	self lockAlarmsDuring: [:pending |
+ 		(pending isEmpty not and: [pending first scheduledTime < nowTime])
+ 			ifTrue: [triggered add: pending removeFirst]].
+ 	triggered do: [:alarm | alarm value: nowTime].
- 		[pending isEmpty not and:[pending first scheduledTime < nowTime]]
- 			whileTrue:[pending removeFirst value: nowTime].
- 	].
  	lastAlarmTime := nowTime.!

More information about the Squeak-dev mailing list