Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Side by Side Diff: corelib/src/future.dart

Issue 9690003: - Fix use of String operator + in runtime and standalone libraries. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « corelib/src/expect.dart ('k') | runtime/bin/directory_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Dart core library. 5 // Dart core library.
6 6
7 7
8 /** 8 /**
9 * A [Future] is used to obtain a value sometime in the future. Receivers of a 9 * A [Future] is used to obtain a value sometime in the future. Receivers of a
10 * [Future] obtain the value by passing a callback to [then]. For example: 10 * [Future] obtain the value by passing a callback to [then]. For example:
11 * 11 *
12 * Future<int> future = getFutureFromSomewhere(); 12 * Future<int> future = getFutureFromSomewhere();
13 * future.then((value) { 13 * future.then((value) {
14 * print("I received the number " + value); 14 * print("I received the number $value");
15 * }); 15 * });
16 */ 16 */
17 interface Future<T> default FutureImpl<T> { 17 interface Future<T> default FutureImpl<T> {
18 18
19 /** A future whose value is immediately available. */ 19 /** A future whose value is immediately available. */
20 Future.immediate(T value); 20 Future.immediate(T value);
21 21
22 /** The value provided. Throws an exception if [hasValue] is false. */ 22 /** The value provided. Throws an exception if [hasValue] is false. */
23 T get value(); 23 T get value();
24 24
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 // Special case where all the futures are already completed, 184 // Special case where all the futures are already completed,
185 // trigger the value now. 185 // trigger the value now.
186 if (futures.length == 0) { 186 if (futures.length == 0) {
187 completer.complete(values); 187 completer.complete(values);
188 } 188 }
189 189
190 return completer.future; 190 return completer.future;
191 } 191 }
192 } 192 }
OLDNEW
« no previous file with comments | « corelib/src/expect.dart ('k') | runtime/bin/directory_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698