Chromium Code Reviews
DescriptionAdd Future.of that calls a function and captures the result
This makes
new Future.of(func)
equivalent to
new Future.immediate(null).then((_) => func())
which should kill that idiom.
Committed: https://code.google.com/p/dart/source/detail?r=17979
Patch Set 1 #Patch Set 2 : WIth tests and bugfixes #
Total comments: 5
Patch Set 3 : Reuse _setOrChainValue for Future.of #Patch Set 4 : Better comment. #
Messages
Total messages: 3 (0 generated)
|
|||||||||||||||||||||||||||||||||||||