Re: [whatwg/streams] Refactor TransformStream's backpressure handling (#571)

tyoshino commented on this pull request.



> @@ -97,40 +105,51 @@ function TransformStreamErrorInternal(transformStream, e) {
   }
 }
 
-function TransformStreamReadyPromise(transformStream) {
-  assert(transformStream._backpressureChangePromise !== undefined);
+// Used for preventing the next write() call on TransformStreamSink until there
+// is no longer backpressure.
+function TransformStreamBackpressureGonePromise(transformStream) {

Analogy is good. But I think it's better to just describe what it's representing directly. Either just explaining connection with the variables this method is depending on, which is backpressure signal which clearly belongs to the TransformStream class, or explicitly point which of the source or sink the method is about by adding Readable or Source. In that case, I think the analogous "ready" works greatly for comprehensibility.

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

Received on Friday, 28 October 2016 14:40:31 UTC