[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.
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.
Should this be marked Experimental?
| } | ||
|
|
||
| /** | ||
| * Creates an UnicastSubject with an internal buffer capacity hint 16 and given delay error flag |
| * @param capacityHint the capacity hint for the internal, unbounded queue | ||
| * @since 2.0 | ||
| */ | ||
| UnicastSubject(int capacityHint) { |
There was a problem hiding this comment.
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
akarnokd
left a comment
There was a problem hiding this comment.
Could you also do it for UnicastProcessor?
| @@ -127,12 +128,13 @@ public static <T> UnicastSubject<T> create(int capacityHint, Runnable onTerminat | |||
| * @return an UnicastSubject instance | |||
| */ | |||
There was a problem hiding this comment.
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
UnicastSubjectwith methodsUnicastSubject<T> create(boolean delayError),UnicastSubject<T> create(int capacityHint, Runnable onTerminated, boolean delayError). Relates to #5165