The Inbox: PromisesLocal-rww.23.mcz

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

The Inbox: PromisesLocal-rww.23.mcz

commits-2
A new version of PromisesLocal was added to project The Inbox:
http://source.squeak.org/inbox/PromisesLocal-rww.23.mcz

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

Name: PromisesLocal-rww.23
Author: rww
Time: 4 October 2020, 1:20:20.780612 pm
UUID: c8dc6ade-af3b-4dc2-96cf-328fbe79fed6
Ancestors: PromisesLocal-rww.22

finish cycling out unused protocol

=============== Diff against PromisesLocal-rww.21 ===============

Item was removed:
- ----- Method: BrokenPromise>>promise (in category 'as yet unclassified') -----
- promise
- ^ self exception!

Item was added:
+ ----- Method: Promise>>>> (in category 'monad') -----
+ >> resolvedBlock
+ "Like >>=, but discards the result of the promise."
+ ^ self then: [:v | resolvedBlock value]!

Item was added:
+ ----- Method: Promise>>>>= (in category 'monad') -----
+ >>= resolvedBlock
+ "Alias for `then:` allowing convenient chaining."
+ ^ self then: resolvedBlock!

Item was added:
+ ----- Method: Promise>>waitTimeoutSeconds: (in category 'waiting') -----
+ waitTimeoutSeconds: seconds
+ "Wait for at most the given number of seconds for this promise to resolve. Answer true if it is resolved, false otherwise."
+ ^self waitTimeoutMSecs: seconds*1000!