- From: Mattias Buelens <notifications@github.com>
- Date: Thu, 19 Mar 2020 11:48:24 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 19 March 2020 18:48:37 UTC
> so, is it the same bound function or maybe the `readable.cancel` is a shortcut which calls `reader.cancel` (or reverse)? 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)). > Also, does the workflow order matter if I do: > > ```js > reader.releaseLock(); > reader.cancel(); > ``` Yes, the order matters. You cannot call any reader methods after you've released the lock. So `releaseLock()` must always be last. -- 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-601354179
Received on Thursday, 19 March 2020 18:48:37 UTC