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)); |
} |