[squeak-dev] The Trunk: System-tonyg.1054.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jan 30 17:28:54 UTC 2019

Tony Garnock-Jones uploaded a new version of System to project The Trunk:

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

Name: System-tonyg.1054
Author: tonyg
Time: 30 January 2019, 5:22:17.31393 pm
UUID: 5089201f-7cb8-47e9-9426-f23c1e92c977
Ancestors: System-mt.1053

Improve promise resolution error handling via #fulfillWith:.

=============== Diff against System-mt.1053 ===============

Item was changed:
  ----- Method: Project>>future:send:at:args: (in category 'futures') -----
  future: receiver send: aSelector at: deltaMSecs args: args
  	"Send a message deltaSeconds into the future.  Answers a Promise that will be resolved at some time in the future."
  	| pr closure |
  	pr := Promise new.
+ 	closure := [pr fulfillWith: [receiver perform: aSelector withArguments: args]].
- 	closure := [pr resolveWith: (receiver perform: aSelector withArguments: args)].
  	deltaMSecs = 0
  		ifTrue: [self addDeferredUIMessage: closure]
  		ifFalse: [
  			[	(Delay forMilliseconds: deltaMSecs) wait.
  				self addDeferredUIMessage: 
  			] forkAt: Processor userSchedulingPriority + 1.

More information about the Squeak-dev mailing list