Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amb operators for Single and Completable should respect reactive contract 2.3 #3040

Merged
merged 3 commits into from
Aug 14, 2024

Commits on Aug 12, 2024

  1. Make sure Single#amb* variants respect reactive contract

    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.
    daschl committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    54ed57b View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2024

  1. Apply feedback round

    daschl committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    dd3b4a0 View commit details
    Browse the repository at this point in the history
  2. Update servicetalk-concurrent-internal/src/main/java/io/servicetalk/c…

    …oncurrent/internal/DelayedCancellable.java
    
    Co-authored-by: Bryce Anderson <bl_anderson@apple.com>
    idelpivnitskiy and bryce-anderson authored Aug 13, 2024
    Configuration menu
    Copy the full SHA
    e028267 View commit details
    Browse the repository at this point in the history