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

Improvement around Uni creation and subscription #189

Merged
merged 2 commits into from
Jun 27, 2020

Conversation

cescoffier
Copy link
Contributor

Add specialized implementation of Uni when we know the item/failure. It avoids delegating to an emitter.
Optimized the subscription on a Uni, if this Uni is an AbstractUni.

@jponge jponge self-requested a review June 26, 2020 13:12
Copy link
Member

@jponge jponge left a comment

Choose a reason for hiding this comment

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

LGTM

*/
public static <T> void subscribe(Uni<? extends T> upstream, UniSubscriber<? super T> subscriber) {
if (upstream instanceof AbstractUni) {
//noinspection unchecked
Copy link
Member

Choose a reason for hiding this comment

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

What's this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Making IntelliJ and Sonar happy.

@cescoffier cescoffier merged commit b3470cd into master Jun 27, 2020
@cescoffier cescoffier deleted the features/uni-specific-construct branch June 27, 2020 06:55
@cescoffier cescoffier added this to the 0.6.0 milestone Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants