mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
![iposva@google.com](/assets/img/avatar_default.png)
- Make sure to lookup main in re-exported namespaces too. R=asiva@google.com Review URL: https://codereview.chromium.org//864233003 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43078 260f80e4-7a28-3924-810f-c04153c831b5
21 lines
503 B
Dart
21 lines
503 B
Dart
import "dart:async";
|
|
import "dart:isolate";
|
|
import "package:expect/expect.dart";
|
|
|
|
main() {
|
|
print("Spawning isolate.");
|
|
var t = new Timer(new Duration(seconds:5), () {
|
|
Expect.fail("Isolate was not spawned successfully.");
|
|
});
|
|
var rp = new RawReceivePort();
|
|
rp.handler = (msg) {
|
|
print("Spawned main called.");
|
|
Expect.equals(msg, 50);
|
|
rp.close();
|
|
};
|
|
Isolate.spawnUri(Uri.parse("spawn_uri_exported_main.dart"), null, rp.sendPort).then((_) {
|
|
print("Loaded");
|
|
t.cancel();
|
|
});
|
|
}
|