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

Unified Diff: runtime/lib/isolate.dart

Issue 8457005: convert isolates to use Future (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: updated co19 Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « frog/lib/isolate.dart ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/isolate.dart
diff --git a/runtime/lib/isolate.dart b/runtime/lib/isolate.dart
index 2615a44ca63191b9c0ff7a62cde7c36ce42e4537..9a7aa99df65b65107e97a1ca092bd51cb785ec80 100644
--- a/runtime/lib/isolate.dart
+++ b/runtime/lib/isolate.dart
@@ -135,11 +135,11 @@ class SendPortImpl implements SendPort {
class IsolateNatives {
- static Promise<SendPort> spawn(Isolate isolate, bool isLight) {
- Promise<SendPort> result = new Promise<SendPort>();
+ static Future<SendPort> spawn(Isolate isolate, bool isLight) {
+ Completer<SendPort> completer = new Completer<SendPort>();
SendPort port = _start(isolate, isLight);
- result.complete(port);
- return result;
+ completer.complete(port);
+ return completer.future;
}
// Starts a new isolate calling the run method on a new instance of the
« no previous file with comments | « frog/lib/isolate.dart ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698