Making a Promise
Future methodsFor: ‘demonstration’
demo
| f |
f := Future promising: [2+2].
f printString '4.0'
Future class methodsFor: 'instance creation'
promising: aBlock
| aFuture |
aFuture := self new.
^aFuture promising: aBlock
Previous slide
Next slide
Back to first slide
View graphic version