addSubscription method

FutureOr<void> addSubscription(
  1. LightSubscription<T> subs
)

Implementation

FutureOr<void> addSubscription(LightSubscription<T> subs) async {
  if (!_isBusy!) {
    return _onData!.add(subs);
  } else {
    await Future.delayed(Duration.zero);
    return _onData!.add(subs);
  }
}