dart-sdk/sdk
Lasse R.H. Nielsen d509ddb3fa Use FutureOr more and make Future.sync return the resulting Future directly.
When the computation passed to Future.sync returns a Future of the correct type,
then it's returned directly instead of wrapping it again.
(Until strong mode, we have an extra case for when it returns a Future of an
incorrect type, but that will eventually be removed).

This should improve the performance of Future.sync a bit.

Also adds missing Zone intercept for when the Future.sync computation throws.

Updates documentation for Future.doWhile.

Fixes #29202
BUG= http://dartbug.com/29202
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2790663003 .
2017-03-31 12:41:07 +02:00
..
bin Fix spew when running presubmit which triggers dartfmt.bat on windows. We should also backport this change to the sdks in tools/sdk or roll a new version of the tools/sdk 2017-03-28 08:30:10 -07:00
lib Use FutureOr more and make Future.sync return the resulting Future directly. 2017-03-31 12:41:07 +02:00
api_readme.md