Re: [whatwg/streams] Reject pending reads when releasing reader (#1168)

@MattiasBuelens commented on this pull request.



> @@ -257,13 +258,18 @@ function ReadableStreamPipeTo(source, dest, preventClose, preventAbort, preventC
     setPromiseIsHandledToTrue(pipeLoop());
 
     function waitForWritesToFinish() {
-      // Another write may have started while we were waiting on this currentWrite, so we have to be sure to wait

Originally, I was fiddling with `pipeTo()` so that it waits for all of its `read()` and `write()` promises to settle. There was a `waitForReadsAndWritesToFinish()` helper that checked and waited for both, and this pattern made that easier. But that's no longer in the current version, so it's no longer needed.

I'll revert it.

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

Message ID: <whatwg/streams/pull/1168/review/844116816@github.com>

Received on Wednesday, 5 January 2022 00:18:47 UTC