Re: [whatwg/streams] What the difference between ReadableStream.cancel() and ReadableStreamDefaultReader.cancel()? (#1033)

> They are different functions, see the spec [here](https://streams.spec.whatwg.org/#rs-cancel) and [here](https://streams.spec.whatwg.org/#default-reader-cancel). They have different preconditions, but they have the same effect (calling the abstract operation [ReadableStreamCancel](https://streams.spec.whatwg.org/#readable-stream-cancel)).


Does it mean, that the better/proper/primary/shorter cancellation route is:
```javascript
reader.releaseLock();
stream.cancel();
```

Also, does the "loss of interest" signaling means that i shall not do:
```javascript
reader = stream.getReader();
```
..anymore, and i should recreate a stream?






-- 
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/issues/1033#issuecomment-601417098

Received on Thursday, 19 March 2020 21:07:37 UTC