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
Add missed when*
operators for async sources
#926
Comments
Hi, I want to work on this. Should we have |
Thanks for your interest @shekhar-rajak! |
Thanks, @idelpivnitskiy I will work on it. Please let me know how can I verify/test/debug the method newly created. |
Since this work does not add new logic (it only makes API consistent) and all new methods will delegate to the already existing servicetalk/servicetalk-concurrent-api/src/main/java/io/servicetalk/concurrent/api/Completable.java Lines 175 to 177 in b4413a1
|
Thanks, I understand it. |
Motivation Missing when* operators for async sources Publisher, Single and Completable Modifications Defining: Completable.whenOnSubscribe(Consumer<Cancellable>) Completable.whenSubscriber(Supplier<? extends Subscriber>) Single.whenOnSubscribe(Consumer<Cancellable>) Single.whenSubscriber(Supplier<? extends Subscriber<? super T>>) Publisher.whenSubscription(Supplier<? extends Subscription>) Publisher.whenSubscriber(Supplier<? extends Subscriber<? super T>>) Result Above Operators will behave like after* . Fixes: #926
All asynchronous sources (
Completable
,Single
,Publisher
) havebefore*
,when*
, andafter*
operators, for example:Completable.beforeOnError(...)
Completable.whenOnError(...)
Completable.afterOnError(...)
However, a few
when*
operators were missed:Completable.whenOnSubscribe(Consumer<Cancellable>)
Completable.whenSubscriber(Supplier<? extends Subscriber>)
Single.whenOnSubscribe(Consumer<Cancellable>)
Single.whenSubscriber(Supplier<? extends Subscriber<? super T>>)
Publisher.whenSubscription(Supplier<? extends Subscription>)
Publisher.whenSubscriber(Supplier<? extends Subscriber<? super T>>)
We should add these operators.
when*
usually behaves likeafter*
.The text was updated successfully, but these errors were encountered: