blob: 273c27709a60b7d3a24265fd90764e5d9e8eb56a [file] [log] [blame]
library;
import self as self;
import "dart:core" as core;
import "dart:isolate" as iso;
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);
}