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

Side by Side Diff: corelib/unified/core/implementation/completer.dart

Issue 10830117: Port the remaining of dart:core to the unified corelib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
OLDNEW
(Empty)
1 // Copyright 2012 Google Inc. All Rights Reserved.
Mads Ager (google) 2012/08/01 13:48:34 Wrong copyright notice. I would remove this again
Anders Johnsen 2012/08/01 14:21:09 I'll remove it again. The reason for moving them
2 // Dart core library.
3
4 class CompleterImpl<T> implements Completer<T> {
5
6 final FutureImpl<T> _futureImpl;
7
8 CompleterImpl() : _futureImpl = new FutureImpl() {}
9
10 Future<T> get future() {
11 return _futureImpl;
12 }
13
14 void complete(T value) {
15 _futureImpl._setValue(value);
16 }
17
18 void completeException(Object exception, [Object stackTrace]) {
19 _futureImpl._setException(exception, stackTrace);
20 }
21 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698