Skip to content
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

Why the prefetch size is not equal to the request size? #283

Open
shareisall opened this issue Aug 23, 2024 · 0 comments
Open

Why the prefetch size is not equal to the request size? #283

shareisall opened this issue Aug 23, 2024 · 0 comments

Comments

@shareisall
Copy link

shareisall commented Aug 23, 2024

In package rsocket-adapter-rxjs, why the prefetch size is not equal to the request size? In some case, I need exact size per request.

file: packages/rsocket-adapter-rxjs/src/RSocketPublisher2PrefetchingObservableToObserver2BufferingRSocketSubscriber.ts
line 86:
this.scheduler.schedule(() => this.subscriber.request(this.prefetch - 1));

file: packages/rsocket-adapter-rxjs/src/RSocketPublisherToPrefetchingObservable.ts
line 65:
this.limit = prefetch - (prefetch >> 2);
line 77~80:

if (this.received % this.limit === 0) {
  this.scheduler.schedule(() => this.subscriber.request(this.limit));
  return;
}
@shareisall shareisall changed the title while prefetch is not equal request size? while prefetch size is not equal to request size? Aug 23, 2024
@shareisall shareisall changed the title while prefetch size is not equal to request size? Why the prefetch size is not equal to the request size? Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant