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

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

Issue 23368003: Cleanup of isolate.status (first step) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // This test creates a lot of isolates. This is meant to exhaust 5 // This test creates a lot of isolates. This is meant to exhaust
6 // resources if the isolates aren't closed correctly (which happened 6 // resources if the isolates aren't closed correctly (which happened
7 // in dart2js). 7 // in dart2js).
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:isolate'; 10 import 'dart:isolate';
11 11
12 // TODO(ahe): Remove this import when we have wrapper-less testing. 12 // TODO(12588): Remove this import when we have wrapper-less testing.
13 import 'dart:html'; 13 import 'dart:html';
14 14
15 worker() { 15 worker() {
16 port.receive((String uri, SendPort replyTo) { 16 port.receive((String uri, SendPort replyTo) {
17 replyTo.send('Hello from Worker'); 17 replyTo.send('Hello from Worker');
18 port.close(); 18 port.close();
19 }); 19 });
20 } 20 }
21 21
22 main() { 22 main() {
(...skipping 14 matching lines...) Expand all
37 window.postMessage('unittest-suite-success', '*'); 37 window.postMessage('unittest-suite-success', '*');
38 return; 38 return;
39 } 39 }
40 spawnFunction(worker).call('').then(spawnMany); 40 spawnFunction(worker).call('').then(spawnMany);
41 print('isolateCount = $isolateCount'); 41 print('isolateCount = $isolateCount');
42 } 42 }
43 43
44 spawnMany('Hello from Worker'); 44 spawnMany('Hello from Worker');
45 window.postMessage('unittest-suite-wait-for-done', '*'); 45 window.postMessage('unittest-suite-wait-for-done', '*');
46 } 46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698