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

@jakearchibald I added AsyncIterators based on what I thought it might make sense for Node.js Streams, we also did a couple of implementations and this turned out to be more performant*. It's an experimental feature that is shipping for the first time in 2 weeks (it will print a warning and notify the users). We can definitely change any part of what I did in [implementation](https://github.com/nodejs/node/blob/master/lib/internal/streams/async_iterator.js) before it gets out of experimental (ideally before Node 10 goes LTS in October, but even later if things are in flux).

> break invokes return(), which per the above design will cancel the stream.

I guess my implementation of `return`  should be correct then, thanks!

* It will need to be benchmarked again in the future, V8 is shipping a lot of optimizations for promises, generators and AsyncIterators.

-- 
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-380957054

Received on Thursday, 12 April 2018 21:59:09 UTC