OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 // Note: the following comment is used by test.dart to additionally compile the |
| 6 // other isolate's code. |
| 7 // OtherScripts=issue_12474_child.dart |
| 8 // OtherScripts=package/issue_12474_lib.dart |
| 9 |
| 10 import 'dart:isolate'; |
| 11 |
| 12 final SPAWN_PACKAGE_ROOT = Uri.parse("."); |
| 13 |
| 14 void main([args, port]) { |
| 15 var p = new ReceivePort(); |
| 16 Isolate.spawnUri(Uri.parse("issue_12474_child.dart"), |
| 17 [p.sendPort], |
| 18 {}, |
| 19 packageRoot: SPAWN_PACKAGE_ROOT); |
| 20 p.listen((msg) { |
| 21 print("Received message"); |
| 22 p.close(); |
| 23 }); |
| 24 } |
OLD | NEW |