- From: Domenic Denicola <notifications@github.com>
- Date: Thu, 25 Mar 2021 15:31:53 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 25 March 2021 22:32:06 UTC
@domenic commented on this pull request. > + assert(reader._readRequests.length === 0); + ReadableStreamReaderGenericRelease(reader); + + reader = AcquireReadableStreamBYOBReader(stream); + forwardReaderError(reader); + } + + const readIntoRequest = { + chunkSteps: chunk => { + // This needs to be delayed a microtask because it takes at least a microtask to detect errors (using + // reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let + // successful synchronously-available reads get ahead of asynchronously-available errors. + queueMicrotask(() => { + reading = false; + + if (forBranch2 === true) { I'm not sure; I was genuinely asking :). I guess I was hoping the duplication would be nicer because once you read a single one of them, you'd be able to glaze over when reading the second. But who knows... -- 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/1114#discussion_r601880830
Received on Thursday, 25 March 2021 22:32:06 UTC