- From: Adam Rice <notifications@github.com>
- Date: Thu, 21 Jan 2021 16:39:09 -0800
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 22 January 2021 00:39:21 UTC
@ricea commented on this pull request.
> @@ -1456,6 +1456,6 @@ function ReadableStreamFromIterable(asyncIterable) {
return promiseResolvedWith(returnResult);
}
- stream = CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm);
+ stream = CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, 0);
> By default, a `TransformStream` is indeed created with a readable HWM of 0, but it still has a **writable HWM** of 1. So piping a stream into it _will_ pull at least one chunk, to fill the writable end's queue.
Yes. As you observed, a writable stream with a HWM of 0 will always have backpressure. So adding an identity TransformStream to a pipe can't be a complete no-op: it always increases the total queue size by 1.
> Hmm. I have a slight bias toward keeping our default, since it must have been picked for a reason :).
In implementation practice we seem to be setting readable HWM to 0 whenever we create a platform stream, because it permits maximum control over backpressure. So I'm not sure the default of 1 is correct.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/1083#discussion_r562292762
Received on Friday, 22 January 2021 00:39:21 UTC