-
Notifications
You must be signed in to change notification settings - Fork 7.6k
1.x: merge/flatMap to keep scalar/inner element relative order #4209
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
Conversation
Current coverage is 84.31%@@ 1.x #4209 diff @@
==========================================
Files 265 265
Lines 17281 17291 +10
Methods 0 0
Messages 0 0
Branches 2617 2619 +2
==========================================
+ Hits 14558 14579 +21
+ Misses 1881 1869 -12
- Partials 842 843 +1
|
Thanks @akarnokd for quick fix. I haven't reviewed yet but I'm keen to see the issue resolved in a release soon (I also was suprised |
@@ -352,9 +352,15 @@ void tryEmit(InnerSubscriber<T> subscriber, T value) { | |||
} | |||
} | |||
if (success) { | |||
emitScalar(subscriber, value, r); | |||
if (subscriber.queue == null || subscriber.queue.isEmpty()) { |
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.
assign subscriber.queue
to local variable to avoid double volatile read?
reviewed 👍 |
Updated, thanks @davidmoten ! |
👍 |
1 similar comment
👍 |
This PR changes flatmap to make sure there is no element reordering happening on the fast-paths.
Related: #4206.