Re: [whatwg/streams] Define WritableStreamDefaultController.signal (#1132)

@yutakahirano commented on this pull request.



> @@ -4421,7 +4441,8 @@ the {{WritableStream}}'s public API.
  1. [=Reject=] |stream|.[=WritableStream/[[inFlightCloseRequest]]=] with |error|.
  1. Set |stream|.[=WritableStream/[[inFlightCloseRequest]]=] to undefined.
  1. Assert: |stream|.[=WritableStream/[[state]]=] is "`writable`" or "`erroring`".
- 1. If |stream|.[=WritableStream/[[pendingAbortRequest]]=] is not undefined,
+ 1. If |stream|.[=WritableStream/[[pendingAbortRequest]]=] is not undefined and |error| is not an

Let me quote @vasilvv's example for WebTransport.

>  Imagine I have a web app where I can do drawing online.  Every 100ms or so, I send the entirety of the drawing on a dedicated WebTransport stream.  Note that if a network connection becomes spotty for a short period of time, this will cause a lot of streams to be open at once, so I want to keep only the three most recent streams open, and reset all streams that are older than the last three.

Here we want to map [the reset operation](https://w3c.github.io/webtransport/#stream-reset) to `abort()`. We are planning to resolve the promise returned by `close()` when the the last chunk is ack-ed, and until then the close operation is always cancellable - by just sending a RESET_STREAM frame.

-- 
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/1132#discussion_r645949646

Received on Saturday, 5 June 2021 06:20:38 UTC