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

Side by Side Diff: tests/isolate/mandel_isolate_test.dart

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 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/html/utils.dart ('k') | tests/isolate/serialization_test.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 'dart:isolate'; 6 import 'dart:isolate';
7 import 'dart:math'; 7 import 'dart:math';
8 import '../../pkg/unittest/lib/unittest.dart'; 8 import '../../pkg/unittest/lib/unittest.dart';
9 9
10 const TERMINATION_MESSAGE = -1; 10 const TERMINATION_MESSAGE = -1;
(...skipping 21 matching lines...) Expand all
32 _validated = new Completer<bool>(); 32 _validated = new Completer<bool>();
33 } 33 }
34 34
35 void startClient(int id) { 35 void startClient(int id) {
36 assert(_sent < N); 36 assert(_sent < N);
37 final client = new LineProcessorClient(this, id); 37 final client = new LineProcessorClient(this, id);
38 client.processLine(_sent++); 38 client.processLine(_sent++);
39 } 39 }
40 40
41 void notifyProcessedLine(LineProcessorClient client, int y, List<int> line) { 41 void notifyProcessedLine(LineProcessorClient client, int y, List<int> line) {
42 assert(_result[y] === null); 42 assert(_result[y] == null);
43 _result[y] = line; 43 _result[y] = line;
44 _lineProcessedBy[y] = client; 44 _lineProcessedBy[y] = client;
45 45
46 if (_sent != N) { 46 if (_sent != N) {
47 client.processLine(_sent++); 47 client.processLine(_sent++);
48 } else { 48 } else {
49 client.shutdown(); 49 client.shutdown();
50 } 50 }
51 51
52 // If all lines have been computed, validate the result. 52 // If all lines have been computed, validate the result.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void processLines() { 133 void processLines() {
134 port.receive((message, SendPort replyTo) { 134 port.receive((message, SendPort replyTo) {
135 if (message == TERMINATION_MESSAGE) { 135 if (message == TERMINATION_MESSAGE) {
136 assert(replyTo == null); 136 assert(replyTo == null);
137 port.close(); 137 port.close();
138 } else { 138 } else {
139 replyTo.send(processLine(message), null); 139 replyTo.send(processLine(message), null);
140 } 140 }
141 }); 141 });
142 } 142 }
OLDNEW
« no previous file with comments | « tests/html/utils.dart ('k') | tests/isolate/serialization_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698