[streams] Never-released lock / getReader({unreleasable: true}) (#358)

Is it worth introducing lock that will never be released, even when closed or errored? As an implementer, I think it is useful.

Let `rs1` be ReadableByteStream, `{ws2, rs2}` be an identity transform stream and `ws3` be a WritableStream.
When we connect `rs1` and `ws2`, and `rs2` and `ws3`, we effectively transfer data from (the source of) `rs1` to (the sink of) `ws3`. We would like to optimize the data transfer by transferring data directly from the source of `rs1` to the sink of `ws3`, but we need to report the end-of-transfer to `{ws2, rs2}`. If we can state that the lock gotten by `pipeTo` will never be released, we can omit the report and that simplify the implementation (For example in a case where these streams live in different threads / processes each other).



---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/358

Received on Thursday, 28 May 2015 13:31:32 UTC