[squeak-dev] The Trunk: System-fbs.530.mcz

commits at source.squeak.org commits at source.squeak.org
Fri May 17 09:41:24 UTC 2013


Frank Shearar uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-fbs.530.mcz

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

Name: System-fbs.530
Author: fbs
Time: 17 May 2013, 10:38:47.389 am
UUID: 57d1fbc2-25bf-4f2e-8762-3cb8d0da925a
Ancestors: System-fbs.529

This code reshuffle makes it visually much more obvious how Project >> #future:send:at:args: and MorphicProject >> #future:send:at:args: differ. (Hint: not a lot.)

=============== Diff against System-fbs.529 ===============

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 |
  	pr := Promise new.
+ 	closure := [pr resolveWith: (receiver perform: aSelector withArguments: args)].
  	deltaMSecs = 0
+ 		ifTrue: [self addDeferredUIMessage: closure]
- 		ifTrue: [
- 			self addDeferredUIMessage: 
- 				[pr resolveWith: (receiver perform: aSelector withArguments: args)]
- 		]
  		ifFalse: [
  			[	(Delay forMilliseconds: deltaMSecs) wait.
  				self addDeferredUIMessage: 
+ 					closure
- 					[pr resolveWith: (receiver perform: aSelector withArguments: args)]
  			] forkAt: Processor userSchedulingPriority + 1.
  		].
  	^pr
  		!



More information about the Squeak-dev mailing list