Merge can now operate in horizontally unbounded mode.#3169
Merged
akarnokd merged 1 commit intoReactiveX:1.xfrom Nov 10, 2015
Merged
Merge can now operate in horizontally unbounded mode.#3169akarnokd merged 1 commit intoReactiveX:1.xfrom
akarnokd merged 1 commit intoReactiveX:1.xfrom
Conversation
Member
|
I'll have to allocate some time to review this later as it is somewhat detailed. Thank you for tackling this. |
Member
That was done by design, since scalars behave as The reason we can't limit the number of async |
akarnokd
added a commit
to akarnokd/RxJava
that referenced
this pull request
Nov 9, 2015
I forgot to add the choice because 2.x SpscArrayQueue doesn't use Unsafe. I copied the SpscAtomicArrayQueue from ReactiveX#3169 and I hope it won't conflict.
|
👍 |
Member
Author
|
I'll rebase this. |
fb80b82 to
e8beca7
Compare
Member
Author
|
Rebased, let's get this finally in. |
akarnokd
added a commit
that referenced
this pull request
Nov 10, 2015
Merge can now operate in horizontally unbounded mode.
|
Thanks |
tejasgarde
pushed a commit
to tejasgarde/RxJava
that referenced
this pull request
Apr 4, 2016
I forgot to add the choice because 2.x SpscArrayQueue doesn't use Unsafe. I copied the SpscAtomicArrayQueue from ReactiveX#3169 and I hope it won't conflict.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #3156
Note that since the default merge operation is unbounded, this change could lead to an excessive memory usage when flatMapping fast sources. Note that the pre 1.0.13 version did this albeit on a slighty slower path.
The change also affects the scalar optimization as well. Pre 1.0.13 implicitly limited the concurrency level to RxRingBuffer.SIZE when scalars were received. This version now fills the queue up to the concurrency level.
For 2.0, I suggest having a bounded behavior by default and require the developer to specify Integer.MAX_VALUE to go for the unbounded behavior so he/she knows about the consequences.