Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

BufferWithSize with Backpressure Support#1507

Merged
benjchristensen merged 2 commits intoReactiveX:masterfrom
zsxwing:backpressure-bufferWithSize
Aug 11, 2014
Merged

BufferWithSize with Backpressure Support#1507
benjchristensen merged 2 commits intoReactiveX:masterfrom
zsxwing:backpressure-bufferWithSize

Conversation

@zsxwing
Copy link
Member

@zsxwing zsxwing commented Jul 24, 2014

For #1479

@cloudbees-pull-request-builder

RxJava-pull-requests #1433 SUCCESS
This pull request looks good

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could theoretically be larger than Long.MAX_VALUE

@cloudbees-pull-request-builder

RxJava-pull-requests #1463 SUCCESS
This pull request looks good

@davidmoten
Copy link
Collaborator

isn't that potentially more than required? The number required is exactly skip * (n-1) + count isn't it?

@zsxwing
Copy link
Member Author

zsxwing commented Aug 1, 2014

The number of the first request is count + skip * (n - 1). The number of other requests should be skip * n.
Assume we receive two request n1 and n2, then we should request count + skip * (n1 + n2 - 1) totally. When we receive the request n2, because we already requested count + skip * (n1 - 1), we should request the remain number: count + skip * (n1 + n2 - 1) - (count + skip * (n1 - 1)) = skip * n2.

@davidmoten
Copy link
Collaborator

Gotcha, thanks
On 1 Aug 2014 21:08, "Shixiong Zhu" notifications@github.com wrote:

The number of the first request is count + skip * (n - 1). The number of
other requests should be skip * n.
Assume we receive two request n1 and n2, then we should request count +
skip * (n1 + n2 - 1) totally. When we receive the request n2, because we
already request count + skip * (n1 - 1), we should request the remain
number: count + skip * (n1 + n2 - 1) - count + skip * (n1 - 1) = skip * n2
.


Reply to this email directly or view it on GitHub
#1507 (comment).

benjchristensen added a commit that referenced this pull request Aug 11, 2014
BufferWithSize with Backpressure Support
@benjchristensen benjchristensen merged commit 4e4b0cb into ReactiveX:master Aug 11, 2014
@benjchristensen
Copy link
Member

Thank you.

@zsxwing zsxwing deleted the backpressure-bufferWithSize branch August 12, 2014 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants