Re: [whatwg/streams] ReadableStream.from(X) (#1018)

If this is added it would be really nice if `.from` also accepted a strategy. This way given say an async generator we could pass `highWaterMark` and thus have the stream pull extra values so they're ready more quickly e.g.:

```js
const chunks = ReadableStream.from(
    chunkGenerator, 
    new CountQueueingStrategy({ highWaterMark: 10 }), // Ensure that we're pulling ahead of processing
);
```

-- 
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/1018#issuecomment-733463231

Received on Wednesday, 25 November 2020 04:54:56 UTC