-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Amb
operators for Single
and Completable
should respect reactiv…
…e contract 2.3 (#3040) Motivation ========== Reactive Streams rule 2.3 mandates, that Subscriber.onComplete() and Subscriber.onError(Throwable t) MUST NOT call any methods on the Subscription or the Publisher. Our current amb operator implementation also performs a cancellation on the Single that just completed, which violates the rule. Modifications ============= This changeset modifies the amb operator in a way that all but the one Single which got a termination signal (through onNext or onError) will get the cancellation propagated. The test suite is enhanced to cover this scenario, both for ambWith as well as the static amb factory methods. Result ====== The amb* operator variants adhere to reactive streams 2.3 rule. Co-authored-by: Idel Pivnitskiy <idel.pivnitskiy@apple.com> Co-authored-by: Bryce Anderson <bl_anderson@apple.com>
- Loading branch information
1 parent
d09421a
commit 2316f7c
Showing
4 changed files
with
99 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters