-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 Mono.fromCompletionStage overrides suppressing cancellation #3266
Conversation
Recently, Mono::fromFuture operators were enhanced to support suppresion of subscription cancellation being propagated to the source Future. In case of CompletionStage, this overrides can be also useful, since cancelling the source was a behaviour change and users might need to default to the old behaviour.
* <p> | ||
* <img class="marble" src="doc-files/marbles/fromFuture.svg" alt=""> | ||
* <p> | ||
* Note, use {@link #fromFuture(CompletableFuture, boolean)} with {@code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Note, use {@link #fromFuture(CompletableFuture, boolean)} with {@code | |
* Note, use {@link #fromCompletionStage(CompletableFuture, boolean)} with {@code |
* <p> | ||
* <img class="marble" src="doc-files/marbles/fromFutureSupplier.svg" alt=""> | ||
* <p> | ||
* Note, use {@link #fromFuture(CompletableFuture, boolean)} with {@code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Note, use {@link #fromFuture(CompletableFuture, boolean)} with {@code | |
* Note, use {@link #fromCompletionStage(CompletableFuture, boolean)} with {@code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed I don't think this is the right course of action since that parameter doesn't make sense for all possible inputs (namely, CompletionStage
instances that don't implement Future
)
Closing. It does make sense when the |
Recently, Mono.fromFuture operators were enhanced to support suppresion of subscription cancellation being propagated to the source Future. In case of CompletionStage, this overrides can be also useful, since cancelling the source was a behaviour change and users might need to default to the old behaviour.
This is a follow-up from #3146 and #3252