-
Notifications
You must be signed in to change notification settings - Fork 129
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
fix: rewrite of the concatenation operators #1448
Conversation
This fixes race conditions in concatMap and stream concatenation operators. Refs: #1388
Status: awaiting further tests |
/cc @ozangunalp for some reason you're not part of this org / repo but I'd like your review when you have some bandwidth 😃 |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1448 +/- ##
============================================
- Coverage 89.27% 89.27% -0.01%
- Complexity 3363 3366 +3
============================================
Files 459 459
Lines 13454 13403 -51
Branches 1655 1641 -14
============================================
- Hits 12011 11965 -46
+ Misses 802 801 -1
+ Partials 641 637 -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.
This looks great! Just a minor comment.
if (UPSTREAM_UPDATER.compareAndSet(this, null, s)) { | ||
public void onSubscribe(Subscription subscription) { | ||
if (UPSTREAM_UPDATER.compareAndSet(this, null, subscription)) { | ||
upstream = subscription; |
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.
Normally you don't need this line, atomic updater sets the field
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.
Oh yes,, good catch!
This fixes race conditions in concatMap and stream concatenation operators.
Refs: #1388