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

Unified Diff: tests/isolate/spawn_uri_nested_child1_vm_isolate.dart

Issue 27215002: Very simple version of Isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/isolate/spawn_uri_multi_test.dart ('k') | tests/isolate/spawn_uri_nested_child2_vm_isolate.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/spawn_uri_nested_child1_vm_isolate.dart
diff --git a/tests/isolate/spawn_uri_nested_child1_vm_isolate.dart b/tests/isolate/spawn_uri_nested_child1_vm_isolate.dart
index 26c661703035ad431c0fefaccead7f69c1ea3cf3..867cae311b2228f5d071ba5d1dba22eecf1bfdf1 100644
--- a/tests/isolate/spawn_uri_nested_child1_vm_isolate.dart
+++ b/tests/isolate/spawn_uri_nested_child1_vm_isolate.dart
@@ -8,17 +8,17 @@
library NestedSpawnUriChild1Library;
import 'dart:isolate';
-main() {
+main(List<String> args, message) {
ReceivePort port2 = new ReceivePort();
- port2.receive((msg, SendPort replyTo) {
+ port2.listen((msg) {
+ if (msg != "re: hi") throw "Bad response: $msg";
port2.close();
});
- SendPort s = spawnUri('spawn_uri_nested_child2_vm_isolate.dart');
- s.send('hi', port2.toSendPort());
+ Isolate.spawnUri(Uri.parse('spawn_uri_nested_child2_vm_isolate.dart'),
+ ['hi'], port2.sendPort);
- port.receive((message, SendPort replyTo) {
- var result = message;
- replyTo.send(result);
- });
+ var data = message[0];
+ var replyTo = message[1];
+ replyTo.send(data);
}
« no previous file with comments | « tests/isolate/spawn_uri_multi_test.dart ('k') | tests/isolate/spawn_uri_nested_child2_vm_isolate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698