blob: 74c2005687db45166e67a6179151d6a248415ab0 [file] [log] [blame]
library;
import self as self;
import "dart:core" as core;
import "dart:isolate" as iso;
static field dynamic subscription = null;
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);
}