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

Unified Diff: tests/standalone/http_launch_data/http_spawn_main.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
Index: tests/standalone/http_launch_data/http_spawn_main.dart
diff --git a/tests/standalone/http_launch_data/http_spawn_main.dart b/tests/standalone/http_launch_data/http_spawn_main.dart
index 3960ea6190d3395a5a94c28c58074eaea927bf1c..60fe47369653598c79e243f699172d63cd541527 100644
--- a/tests/standalone/http_launch_data/http_spawn_main.dart
+++ b/tests/standalone/http_launch_data/http_spawn_main.dart
@@ -2,17 +2,17 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library http_lanuch_main;
+library http_launch_main;
import 'dart:isolate';
import 'dart:io';
main(List<String> arguments) {
int port = int.parse(arguments[0]);
- SendPort spawnedPort =
- spawnUri('http://127.0.0.1:$port/http_isolate_main.dart');
- spawnedPort.call('hello').then((response) {
+ ReceivePort receivePort = new ReceivePort();
+ Isolate.spawnUri(Uri.parse('http://127.0.0.1:$port/http_isolate_main.dart'),
+ ['hello'], receivePort.sendPort);
+ receivePort.first.then((response) {
print(response);
});
}
-
« no previous file with comments | « tests/standalone/http_launch_data/http_launch_main.dart ('k') | tests/standalone/io/echo_server_stream_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698