Skip to content

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

@shareisall

Description

@shareisall

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions