Re: [whatwg/streams] Add support for ReadableStream "transfer" type (PR #1271)

> I would lean towards erroring the stream. Silently losing data is something I want to avoid.

Done.

> If we add two-argument enqueue() we should also add two-argument write()

Yes, I plan to do a separate PR for WritableStream.
And probably another for transform stream.

> I would like the two-argument form to work even when not using type: transfer as it is extremely useful in combination with transferable streams. 

I did not add this in this PR but it should be fairly easy to extend it as a follow-up.
I am a bit hesitant to do this at this point:
- Adding a transfer list would trigger cloning of the data (observable in non transferable streams case)
- ReadableStreamTee might fail with those transfer-only values.
- Adding `transfer:true` explicitly makes it clear that the web page opts into that behavior. It is not a big adoption step, filling the transferList is anyway needed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/1271#issuecomment-1504850781
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/streams/pull/1271/c1504850781@github.com>

Received on Wednesday, 12 April 2023 08:11:45 UTC