Re: [whatwg/streams] Add a Random Values Generator Demonstration (#844)

ricea commented on this pull request.



> +     * 
+     * const cqs = new CountQueuingStrategy({
+     *  highWaterMark: 3,
+     * });
+     */
+    const queuingStrategy = {
+        highWaterMark: 3,
+        size() { return 1; }
+    }
+
+    const writable = new WritableStream({
+        async write(chunk, controller) {
+            try {
+                await writeChunk(chunk);
+                return;
+            } catch (error) {

Not necessary to catch the exception. If write() throws, the stream will errored automatically.

-- 
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/844#pullrequestreview-69911386

Received on Tuesday, 17 October 2017 14:53:40 UTC