2.x: Flowable as a Publisher to be fully RS compliant #5112
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR performs the changes suggested in #5110.
FlowableSubscriber
with extra textual specification on its relaxed natureFlowable.subscribe(Subscriber)
checks forFlowableSubscriber
and if not found, it wraps the incoming RSSubscriber
into aStrictSubscriber
that follows the RS spec to the letter at any cost.Flowable.subscribe(FlowableSubscribe)
that most internal operators will useAbstractFlowableWithUpstream
to acceptFlowable
as a source, update operatorsPublisher
input, these were duplicated on their outer containing type but use the same internalFlowableSubscriber
delay
implements Subscriber
withimplements FlowableSubscriber
new Subscriber
withnew FlowableSubscriber
in tests, the rest is required for testing the strictness itself.strict()
is now an identity operator with suggested scheduled removal.Performance impact estimation
Flowable
should go throughsubscribe(FlowableSubscribe)
and thus no overhead change.Publisher
as input, providing aFlowable
will have aninstanceof
check at subscription time and routed to `subscribe(FlowableSubscriber) if the consumer is part of RxJava 2 itself.