Re: [whatwg/streams] make TransformStream respect backpressure (#550)

tyoshino commented on this pull request.



> @@ -262,12 +238,32 @@ class TransformStreamSource {
 
     transformStream._readableController = c;
 
-    return this._startPromise;
+    // delay the first source.pull call until there is backpressure
+    return this._startPromise.then(() => {

I was unclear. I wanted to say the following.

You can pass a promise already then-ed with this callback in TransformStream's constructor to the constructor of TransformStreamSource, and then you just return the passed promise stored in _startPromise (which is already then-ed).

-- 
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/550

Received on Thursday, 27 October 2016 00:34:28 UTC