library; | |
import self as self; | |
import "dart:core" as core; | |
import "dart:isolate" as iso; | |
import "dart:isolate"; | |
static field dynamic subscription; | |
static method onData(dynamic x) → void { | |
core::print(x); | |
self::subscription.cancel(); | |
} | |
static method main() → dynamic { | |
dynamic string = core::String::fromCharCode(65); | |
dynamic port = iso::ReceivePort::•(); | |
self::subscription = port.listen(self::onData); | |
port.sendPort.send(string); | |
} |