- From: isonmad <notifications@github.com>
- Date: Wed, 18 Jan 2017 15:46:24 -0800
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 18 January 2017 23:46:59 UTC
Looks like the ResetQueue stuff needs to be added to Chromium, since it does exactly what the reference implementation does right now.
```js
var strategy = {
size(x) {
return x;
},
highWaterMark: 0
};
var controller;
var rs = new ReadableStream({start(c){controller = c;}}, strategy);
var reader = rs.getReader();
console.log(controller.desiredSize); // prints 0 when empty
controller.enqueue(2);
controller.enqueue(Number.MAX_SAFE_INTEGER);
console.log(reader.read());
reader.read().then(() => console.log(controller.desiredSize)); // prints 1 when empty
```
--
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/661#issuecomment-273638541
Received on Wednesday, 18 January 2017 23:46:59 UTC