-
Notifications
You must be signed in to change notification settings - Fork 579
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
Multi await feature for intentional blocking #1664
Conversation
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.
I have mixed feelings about blocking operators and since Project Loom is not fixed yet, it's unclear how we can play nice with it as well.
common/reactive/src/main/java/io/helidon/common/reactive/MultiCompletionStage.java
Outdated
Show resolved
Hide resolved
common/reactive/src/main/java/io/helidon/common/reactive/Multi.java
Outdated
Show resolved
Hide resolved
common/reactive/src/main/java/io/helidon/common/reactive/MultiCompletionStage.java
Outdated
Show resolved
Hide resolved
Can you rebase against master ? you're missing one of the checks from the new infra. |
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
@tomas-langer had proposed |
Can I ask @romain-grecourt and @tomas-langer for review? @Verdent is blocked by this with #1646 Question is if |
@danielkec Yeah, Let's go ahead with Single implementing CompletionStage, we can leverage it in our APIs where we return a CompletionStage. |
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
common/reactive/src/main/java/io/helidon/common/reactive/Multi.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
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.
LGTM.
We may want to revisit the completion stage single, but this is a good first change
Awaits are now preserved when chaining testMulti()
.forEach(sum::addAndGet)
.whenComplete((aVoid, throwable) -> {})
.thenRun(() -> {})
.thenAccept(aVoid -> {})
.await(); |
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
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.
LGTM
This seems like a massive breaking change just to get a wrapper for a timed
|
@olotenko pls elaborate, is it order of?: subscription.request(Long.MAX_VALUE);
single.onCancel(subscription::cancel); |
Yes, but don't you see the whole design of the change is rickety? A plain static method for two flavours of |
There was a request for blocking feature for
Multi
andSingle
I guess this needs some broader discussion, it kind of feels like introducing an antipattern. But the truth is other impls has similar feature and users will be expecting it.
Signed-off-by: Daniel Kec daniel.kec@oracle.com