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

Side by Side Diff: tests/isolate/src/MandelIsolateTest.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | tests/isolate/src/MintMakerTest.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 #library("MandelIsolateTest"); 5 #library("MandelIsolateTest");
6 #import('TestFramework.dart'); 6 #import('TestFramework.dart');
7 7
8 final TERMINATION_MESSAGE = -1; 8 final TERMINATION_MESSAGE = -1;
9 final N = 100; 9 final N = 100;
10 final ISOLATES = 20; 10 final ISOLATES = 20;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 void shutdown() { 96 void shutdown() {
97 _out.then((SendPort p) { 97 _out.then((SendPort p) {
98 p.send(TERMINATION_MESSAGE, null); 98 p.send(TERMINATION_MESSAGE, null);
99 }); 99 });
100 } 100 }
101 101
102 MandelbrotState _state; 102 MandelbrotState _state;
103 int _id; 103 int _id;
104 Promise<SendPort> _out; 104 Future<SendPort> _out;
105 105
106 } 106 }
107 107
108 108
109 class LineProcessor extends Isolate { 109 class LineProcessor extends Isolate {
110 110
111 LineProcessor() : super() { } 111 LineProcessor() : super() { }
112 112
113 void main() { 113 void main() {
114 this.port.receive((message, SendPort replyTo) { 114 this.port.receive((message, SendPort replyTo) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 result[x] = i; 146 result[x] = i;
147 } 147 }
148 return result; 148 return result;
149 } 149 }
150 150
151 } 151 }
152 152
153 main() { 153 main() {
154 runTests([test]); 154 runTests([test]);
155 } 155 }
OLDNEW
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | tests/isolate/src/MintMakerTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698