-
Notifications
You must be signed in to change notification settings - Fork 128
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
New Multi demand pacing operator #875
Conversation
implementation/src/main/java/io/smallrye/mutiny/operators/multi/MultiDemandPacer.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/mutiny/operators/multi/MultiDemandPacer.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## main #875 +/- ##
============================================
+ Coverage 89.17% 89.20% +0.02%
- Complexity 3074 3089 +15
============================================
Files 386 390 +4
Lines 12354 12446 +92
Branches 1574 1587 +13
============================================
+ Hits 11017 11102 +85
- Misses 703 706 +3
- Partials 634 638 +4
|
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 just made a few minor comments.
* Downstream demand requests are being ignored, so it is possible that this operator requests more than what the downstream | ||
* subscriber would want, depending on the {@link io.smallrye.mutiny.subscription.DemandPacer} | ||
* object in use. | ||
* |
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.
Should we mention onOVerflow()
?
implementation/src/main/java/io/smallrye/mutiny/operators/multi/MultiDemandPacer.java
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/mutiny/subscription/DemandPacer.java
Show resolved
Hide resolved
Demand pacing can be controlled from previous demands and the number of emitted items since the last request. The initial implementation ships with a fixed demand implementation of the demand pacing interface. Users can easily define their own policies, and we can introduce other concrete implementations in the future given use-cases and patterns. This operator is not reactive-streams compliant because the downstream demand has to be ignored. See #872
Co-authored-by: Clement Escoffier <[email protected]>
0f5ee57
to
b939caa
Compare
Demand pacing can be controlled from previous demands and the number of emitted items since the last request.
The initial implementation ships with a fixed demand implementation of the demand pacing interface.
Users can easily define their own policies, and we can introduce other concrete implementations in the future given use-cases and patterns.
This operator is not reactive-streams compliant because the downstream demand has to be ignored.
See #872