You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
would expect both start and end to be printed to console but both node and chrome give the following output:
startabcdefghij
this in contrast to ReadableStreamError() which branches for both byob and normal. Is this behaviour intended? i am unable to understand unfortunately 😅 any help in understanding would be greatly appreciated!
Thank You!
The text was updated successfully, but these errors were encountered:
Yes, this is hard to understand. For a while I thought it was a bug, and then I remembered we did it this way so that the buffer can be returned to the user. I think example 10.5 does it correctly. You need to call controller.byobRequest.respond(0) after controller.close().
On reading the spec for https://streams.spec.whatwg.org/#readable-stream-close we see it asks to perform close steps in case of ReadableStreamDefaultReader but what about the case when its a byob reader? this was first noted when trying to implement nodejs/node#47993 a simple example:
would expect both start and end to be printed to console but both node and chrome give the following output:
this in contrast to
ReadableStreamError()
which branches for both byob and normal. Is this behaviour intended? i am unable to understand unfortunately 😅 any help in understanding would be greatly appreciated!Thank You!
The text was updated successfully, but these errors were encountered: