Re: [streams] Change the model for ReadableStream to have async read() (#288)

> @@ -98,57 +93,45 @@ export default class ReadableStream {
>        resolvePipeToPromise = resolve;
>        rejectPipeToPromise = reject;
>  
> -      source = this.getReader();
> +      source.closed.catch(abortDest);
> +      dest.closed.then(
> +        () => {
> +          if (!closedPurposefully) {

Hmm. If we reach here, that means the user called pipe after closing dest or dest became closed unsolicitedly under locked situation which is just a bug of dest.

So, ... we need this handling in pipeTo algorithm which must detect any bad things, but under assumption that the dest works correctly and the application code is bug-free, this block is unnecessary to handle streams?

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/288/files#r25866276

Received on Thursday, 5 March 2015 14:25:05 UTC