The Trunk: Morphic-tonyg.1477.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-tonyg.1477.mcz

commits-2
Tony Garnock-Jones uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-tonyg.1477.mcz

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

Name: Morphic-tonyg.1477
Author: tonyg
Time: 30 January 2019, 5:21:25.536199 pm
UUID: 77d63568-e43f-4a3d-8930-4849ab7edd7d
Ancestors: Morphic-pre.1476

Improve promise resolution error handling via #fulfillWith:.

=============== Diff against Morphic-pre.1476 ===============

Item was changed:
  ----- Method: MorphicProject>>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: [
  world
  addAlarm: #addDeferredUIMessage:
  withArguments: {closure}
  for: self
  at: (Time millisecondClockValue + deltaMSecs)
  ].
  ^pr
  !