Re: [whatwg/streams] ReadableStream should be an async iterable (#778)

Wrapper object seems like a clear winner.

I didn't like the sound of auto-cancel, but given @domenic's code example it sounds like the better thing to do.

We could have:

```js
for await (const chunk of stream.iterator({ preventClose: true })) {
  // …
}
```

Then `stream[Symbol.asyncIterator]` could alias `stream.iterator`.

-- 
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/issues/778#issuecomment-376916549

Received on Wednesday, 28 March 2018 14:55:26 UTC