-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Description
The javadoc for ObservableEmtter
states:
The emitter allows the registration of a single resource, in the form of a Disposable or Cancellable via setDisposable(Disposable) or setCancellable(Cancellable) respectively. The emitter implementations will dispose/cancel this instance when the downstream cancels the flow or after the event generator logic calls Emitter.onError(Throwable), Emitter.onComplete() or when tryOnError(Throwable) succeeds.
Similarly, the javadoc for FlowableEmitter
states:
The emitter allows the registration of a single resource, in the form of a Disposable or Cancellable via setDisposable(Disposable) or setCancellable(Cancellable) respectively. The emitter implementations will dispose/cancel this instance when the downstream cancels the flow or after the event generator logic calls Emitter.onError(Throwable), Emitter.onComplete() or when tryOnError(Throwable) succeeds.
when the downstream cancels the flow
is ambiguous for a noobie like me. It isn't clear that a subscriber calling dispose
will [cancel] the flow
. It would be very helpful if the relationship between the *Emitter
and the downstream subscriber was more explicit.