Re: [whatwg/streams] Update Byte Streams Explainer (#1088)

@ricea commented on this pull request.

Great! Just a few tweaks needed.

> @@ -86,3 +102,23 @@ function makeReadableByteStream() {
 With this in hand, we can create and use BYOB readers for the returned `ReadableStream`. The adaptation between the
 low-level byte tracking of the underlying byte source shown here, and the higher-level chunk-based consumption of
 a default reader, is all taken care of automatically by the streams implementation.
+
+
+## Goals
+
+*   Provide a way to represent a [ReadableStream](https://streams.spec.whatwg.org/#rs-class) for bytes efficiently.
+*   Avoid races caused by multiple access for the same buffer.

Add `* Permit buffer re-use to reduce GC churn`.

> @@ -86,3 +102,23 @@ function makeReadableByteStream() {
 With this in hand, we can create and use BYOB readers for the returned `ReadableStream`. The adaptation between the
 low-level byte tracking of the underlying byte source shown here, and the higher-level chunk-based consumption of
 a default reader, is all taken care of automatically by the streams implementation.
+
+
+## Goals
+
+*   Provide a way to represent a [ReadableStream](https://streams.spec.whatwg.org/#rs-class) for bytes efficiently.
+*   Avoid races caused by multiple access for the same buffer.
+
+## Non-Goals
+
+*   Ports for non-binary types will not be supported; only Bytes, Int16, etc. are supported by the default readable

I find this a little confusing, since the default readable stream supports all types. How about something like

> Non-binary chunk types will not be supported. They can still use the default type of readable stream.

?

> @@ -86,3 +102,23 @@ function makeReadableByteStream() {
 With this in hand, we can create and use BYOB readers for the returned `ReadableStream`. The adaptation between the
 low-level byte tracking of the underlying byte source shown here, and the higher-level chunk-based consumption of
 a default reader, is all taken care of automatically by the streams implementation.
+
+
+## Goals
+
+*   Provide a way to represent a [ReadableStream](https://streams.spec.whatwg.org/#rs-class) for bytes efficiently.
+*   Avoid races caused by multiple access for the same buffer.
+
+## Non-Goals
+
+*   Ports for non-binary types will not be supported; only Bytes, Int16, etc. are supported by the default readable
+stream and readable byte stream implementations.
+*   Shared array buffers will still not be supported. Currently, we always detach buffers, but shared array buffers

I don't think we need the word "still" here.

-- 
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/1088#pullrequestreview-537277700

Received on Tuesday, 24 November 2020 09:10:54 UTC