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

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

Issue 1275353005: VM thread shutdown. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merge Created 5 years, 3 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
« no previous file with comments | « runtime/vm/verified_memory_test.cc ('k') | tests/isolate/nested_spawn_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 // Dart test program for testing that isolates can spawn other isolates and 5 // Dart test program for testing that isolates can spawn other isolates and
6 // that the nested isolates can communicate with the main once the spawner has 6 // that the nested isolates can communicate with the main once the spawner has
7 // disappeared. 7 // disappeared.
8 8
9 library NestedSpawn2Test; 9 library NestedSpawn2Test;
10 import 'dart:isolate'; 10 import 'dart:isolate';
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 })); 50 }));
51 })); 51 }));
52 })); 52 }));
53 } 53 }
54 54
55 void main([args, port]) { 55 void main([args, port]) {
56 if (testRemote(main, port)) return; 56 if (testRemote(main, port)) return;
57 test("spawned isolate can spawn other isolates", () { 57 test("spawned isolate can spawn other isolates", () {
58 ReceivePort init = new ReceivePort(); 58 ReceivePort init = new ReceivePort();
59 Isolate.spawn(isolateA, init.sendPort); 59 Isolate.spawn(isolateA, init.sendPort);
60 init.first.then(expectAsync((port) { 60 return init.first.then(expectAsync((port) {
61 _call(port, "launch nested!", expectAsync((msg, replyTo) { 61 _call(port, "launch nested!", expectAsync((msg, replyTo) {
62 expect(msg[0], "0"); 62 expect(msg[0], "0");
63 _call(replyTo, msg1, expectAsync((msg, replyTo) { 63 _call(replyTo, msg1, expectAsync((msg, replyTo) {
64 expect(msg[0], "2"); 64 expect(msg[0], "2");
65 _call(replyTo, msg3, expectAsync((msg, replyTo) { 65 _call(replyTo, msg3, expectAsync((msg, replyTo) {
66 expect(msg[0], "4"); 66 expect(msg[0], "4");
67 _call(replyTo, msg5, expectAsync((msg, _) { 67 _call(replyTo, msg5, expectAsync((msg, _) {
68 expect(msg[0], "6"); 68 expect(msg[0], "6");
69 })); 69 }));
70 })); 70 }));
71 })); 71 }));
72 })); 72 }));
73 })); 73 }));
74 }); 74 });
75 } 75 }
OLDNEW
« no previous file with comments | « runtime/vm/verified_memory_test.cc ('k') | tests/isolate/nested_spawn_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698