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

Use FutureMono instead of Mono#fromCompletionStage #2565

Merged
merged 1 commit into from Nov 3, 2022

Conversation

violetagg
Copy link
Member

@violetagg violetagg commented Nov 3, 2022

Reactor Netty does not need the type of cancellation provided by Mono#fromCompletionStage

Related to #2560

Reactor Netty does not need the type of cancellation
provided by Mono#fromCompletionStage
@violetagg violetagg added the type/enhancement A general enhancement label Nov 3, 2022
@violetagg violetagg added this to the 2.0.0-M3 milestone Nov 3, 2022
@violetagg violetagg requested a review from a team November 3, 2022 13:37
Comment on lines +144 to +148
// check once again if is cancelled to see if we need to removeListener in case addListener racing with
// subscription.cancel (which should remove listener)
if (fs.cancelled) {
// future.removeListener(fs); TODO
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you leave the line 147 commented on purpose ?
I ask this because apparently, listeners can't be removed anymore from Future in netty5. So is there something else that still needs to be implemented in case the subscription is cancelled ? If not, then can we remove the lines between L144-L148 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the moment we will keep these TODOs until we are sure that we don't need them. This will happen post M3 release.

Copy link
Member

@pderop pderop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@violetagg
Copy link
Member Author

@pderop Thanks for the review

@violetagg violetagg merged commit 1aca50f into netty5 Nov 3, 2022
@violetagg violetagg deleted the return-future-mono branch November 3, 2022 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants