factory IsolateChannel()

in lib/src/isolate_channel.dart [95:102]


  factory IsolateChannel(ReceivePort receivePort, SendPort sendPort) {
    var controller =
        StreamChannelController<T>(allowForeignErrors: false, sync: true);
    receivePort.cast<T>().pipe(controller.local.sink);
    controller.local.stream
        .listen((data) => sendPort.send(data), onDone: receivePort.close);
    return IsolateChannel._(controller.foreign.stream, controller.foreign.sink);
  }