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

Unified Diff: tests/standalone/vmservice/multiple_isolate_list_script.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/vmservice/multiple_isolate_list_script.dart
diff --git a/tests/standalone/vmservice/multiple_isolate_list_script.dart b/tests/standalone/vmservice/multiple_isolate_list_script.dart
index 128f61a0cc73e237dc3ab62f62222bd9db973026..fd83cc5af9f86b6679efd10cb2b1afe819630afb 100644
--- a/tests/standalone/vmservice/multiple_isolate_list_script.dart
+++ b/tests/standalone/vmservice/multiple_isolate_list_script.dart
@@ -7,23 +7,19 @@ library multiple_isolate_list_script;
import 'dart:io';
import 'dart:isolate';
-void isolateMain1() {
+void isolateMain1(_) {
// Spawn another isolate.
- spawnFunction(myIsolateName);
- // Kill this isolate.
- port.close();
+ Isolate.spawn(myIsolateName, null);
}
-void myIsolateName() {
+void myIsolateName(_) {
// Stay running.
- port.receive((a, b) {
- port.close();
- });
+ new ReceivePort().first.then((a) { });
print(''); // Print blank line to signal that we are ready.
}
main() {
- spawnFunction(isolateMain1);
+ Isolate.spawn(isolateMain1, null);
// Wait until signaled from spawning test.
stdin.first.then((_) => exit(0));
}
« no previous file with comments | « tests/standalone/vmservice/isolate_stacktrace_command_script.dart ('k') | utils/testrunner/run_pipeline.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698