blob: 8025ecfb9a3791df3d6110668e320c10adcf40df [file] [log] [blame]
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 {
core::String string = core::String::fromCharCode(65);
iso::ReceivePort port = iso::ReceivePort::•();
self::subscription = port.{iso::ReceivePort::listen}(self::onData);
port.{iso::ReceivePort::sendPort}.{iso::SendPort::send}(string);
}