-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
[2.x] UnicastSubject fail fast support #5217
Conversation
* @return an UnicastSubject instance | ||
*/ | ||
@CheckReturnValue | ||
public static <T> UnicastSubject<T> create(int capacityHint, Runnable onTerminate, boolean delayError) { |
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 this be marked Experimental?
* @return an UnicastSubject instance | ||
*/ | ||
@CheckReturnValue | ||
public static <T> UnicastSubject<T> create(boolean delayError) { |
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 this be marked Experimental?
} | ||
|
||
/** | ||
* Creates an UnicastSubject with an internal buffer capacity hint 16 and given delay error flag |
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.
nit: missing .
* @param capacityHint the capacity hint for the internal, unbounded queue | ||
* @since 2.0 | ||
*/ | ||
UnicastSubject(int capacityHint) { |
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.
Is this one really needed? The factories could just go and call UnicastSubject(capacityHint, true)
?
Codecov Report
@@ Coverage Diff @@
## 2.x #5217 +/- ##
============================================
- Coverage 96.04% 95.99% -0.05%
- Complexity 5705 5711 +6
============================================
Files 624 624
Lines 40683 40705 +22
Branches 5648 5655 +7
============================================
+ Hits 39075 39076 +1
- Misses 632 655 +23
+ Partials 976 974 -2
Continue to review full report at Codecov.
|
…nstructor, fix typos
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.
Could you also do it for UnicastProcessor?
@@ -127,12 +128,13 @@ | |||
* @return an UnicastSubject instance | |||
*/ |
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.
Also please add @since 2.0.8 - experimental
to all the new methods.
Yes, will do that as separate PR |
Thanks! |
This PR adds support for fail-fast behavior to
UnicastSubject
with methodsUnicastSubject<T> create(boolean delayError)
,UnicastSubject<T> create(int capacityHint, Runnable onTerminated, boolean delayError)
. Relates to #5165