Re: [whatwg/streams] Add WritableStream.write convenience method (PR #1339)

@MattiasBuelens commented on this pull request.



> @@ -4332,6 +4344,22 @@ as seen for example in [[#example-ws-no-backpressure]].
  1. Return ! [$IsWritableStreamLocked$]([=this=]).
 </div>
 
+<div algorithm>
+ The <dfn id="ws-write" method for="WritableStream">write(|chunk|)</dfn> method steps are:

That's very unlikely to change.

For readers, we previously did not allow you to `releaseLock()` while there were pending read requests. For writers, we never had that restriction: you're always allowed to call `releaseLock()` even when there are pending write requests. In fact, [we even recommend](https://streams.spec.whatwg.org/#example-manual-write-dont-await) not awaiting the `writer.write()` promise so you can better respect backpressure (as long as you await `writer.ready` though).

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

Message ID: <whatwg/streams/pull/1339/review/2572160695@github.com>

Received on Friday, 24 January 2025 09:40:14 UTC