servicetalk icon indicating copy to clipboard operation
servicetalk copied to clipboard

Make `Single.concat(Publisher)` behavior consistent on cancel

Open idelpivnitskiy opened this issue 2 years ago • 3 comments

Motivation:

Behavior of Single.concat(Publisher) is different compare to all other concat variants: Single.concat(Completable), Single.concat(Single), Completable.concat(Completable), Completable.concat(Single), Completable.concat(Publisher), Publisher.concat(Completable), Publisher.concat(Single), Publisher.concat(Publisher). It does not subscribe to the next source to propagate cancellation if onSuccess is delivered after cancel.

Modifications:

  • Make tests for all concat valiants consistent in regards to cancellation;
  • Modify Single.concat(Publisher) behavior to subscribe in case onSuccess is delivered after cancel;

Result:

Behavior of Single.concat(Publisher) is consistent with all other concat variants.

idelpivnitskiy avatar Sep 30 '22 22:09 idelpivnitskiy

Decided to open a PR now as it shouldn't cause merge conflicts with #2381.

idelpivnitskiy avatar Sep 30 '22 22:09 idelpivnitskiy

@Scottmitch rebased after your changes, ready for review

idelpivnitskiy avatar Oct 04 '22 00:10 idelpivnitskiy

@idelpivnitskiy - should we close this or do you still think we need this?

Scottmitch avatar Aug 10 '23 14:08 Scottmitch