Re: [whatwg/streams] Fix tee() incorrectly closing before enqueuing to the second branch (#1172)

@ricea approved this pull request.

lgtm

Are there any other issues with the reentrancy here? Would it better to avoid the reentrancy by adding even more microtasks?

> @@ -2271,6 +2274,9 @@ create them does not matter.
      1. If |canceled2| is false, perform !
         [$ReadableStreamDefaultControllerEnqueue$](|branch2|.[=ReadableStream/[[controller]]=],
         |chunk2|).
+     1. Set |reading| to false.
+     1. If |readAgain| is true,

I think this if would be better on one line.

> @@ -2373,6 +2382,11 @@ create them does not matter.
      1. If |canceled2| is false, perform !
         [$ReadableByteStreamControllerEnqueue$](|branch2|.[=ReadableStream/[[controller]]=],
         |chunk2|).
+     1. Set |reading| to false.
+     1. If |readAgainForBranch1| is true,
+      1. Perform |pull1Algorithm|.

Maybe this if should also be on one line.

-- 
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/1172#pullrequestreview-776348115

Received on Monday, 11 October 2021 15:05:30 UTC