[Pkg] The Trunk: Kernel-tonyg.1150.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Feb 4 20:38:04 UTC 2018

David T. Lewis uploaded a new version of Kernel to project The Trunk:

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

Name: Kernel-tonyg.1150
Author: tonyg
Time: 1 February 2018, 9:59:50.393266 am
UUID: 6afb5455-c040-4572-a62a-b292e20856e6
Ancestors: Kernel-tonyg.1149

(Re)introduce isPromise, and use it instead of isKindOf:.

=============== Diff against Kernel-tonyg.1149 ===============

Item was added:
+ ----- Method: Object>>isPromise (in category 'testing') -----
+ isPromise
+ 	^false!

Item was changed:
  ----- Method: Promise>>isPromise (in category 'testing') -----
+ 	^ true!
- 	^ true.!

Item was changed:
  ----- Method: Promise>>resolveWith: (in category 'resolving') -----
  resolveWith: arg
  	"Resolve this promise. If arg is itself a Promise, make this promise depend upon it,
  	as detailed in the Promises/A+ spec:
+ 	arg isPromise
- 	(arg isKindOf: Promise)
  		ifTrue: [
  			arg whenResolved: [:v | self resolveWith: v].
  			arg whenRejected: [:e | self rejectWith: e]]
  		ifFalse: [
  			mutex critical: [
  				(state == #pending) ifTrue: [
  					value := arg.
  					state := #fulfilled.
  					resolvers do: [:r | self evaluateResolver: r]]]]!

More information about the Packages mailing list