[whatwg/streams] Fix readable byte stream example (#1080)

This change fixes a few bugs in the example for readable byte streams. 
One of the bugs in the existing example is that there seems to be infinite 
recursion for streams that have a total length of less than 1024. 
Furthermore, another bug is the return value of reader.read() is not 
destructed, and the buffer is used after detaching. 

In this change, iteration is used instead of recursion, as well as async/
await.
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/streams/pull/1080

-- Commit Summary --

  * Fix bugs in example for readable byte streams
  * add name to acknowledgements

-- File Changes --

    M index.bs (31)

-- Patch Links --

https://github.com/whatwg/streams/pull/1080.patch
https://github.com/whatwg/streams/pull/1080.diff

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

Received on Tuesday, 27 October 2020 13:06:17 UTC