Re: [streams] Byte stream update, including reference implementation (#361)

> +  controller._insideUnderlyingByteSource = false;
> +}
> +
> +function CallPullOrPullIntoLaterIfNeeded(controller) {
> +  if (controller._insideUnderlyingByteSource) {
> +    controller._callPullOrPullIntoLaterIfNeeded = true;
> +    return;
> +  }
> +
> +  Promise.resolve().then(CallPullOrPullIntoRepeatedlyIfNeeded.bind(undefined, controller));
> +}
> +
> +function CallPullOrPullIntoRepeatedlyIfNeeded(controller) {
> +  const stream = controller._controlledReadableByteStream;
> +
> +  while (true) {

What if they respond asynchronously? I am confused when this loops.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/361/files#r33552677

Received on Tuesday, 30 June 2015 08:55:59 UTC