tryRecv method

  1. @override
RecvResult<T> tryRecv()

Implementation

@override
RecvResult<T> tryRecv() {
  final lc = localRecvChannel;
  if (lc != null) {
    final ring = lc.buf as BroadcastRing<T>;
    final t0 = mx.startRecvTimer();
    final res = ring.tryReceive(_cursor!);
    if (res.hasValue) {
      mx.tryRecvOk(t0);
    } else if (res.isEmpty) {
      mx.tryRecvEmpty();
    }
    return res;
  }
  return super.tryRecv();
}