- From: Mattias Buelens <notifications@github.com>
- Date: Sat, 08 Jul 2023 07:51:49 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 8 July 2023 14:51:56 UTC
I suppose it would be more accurate to say that `stream.cancel()` behaves like `const reader = stream.getReader(); reader.cancel(); reader.releaseLock()`, where `reader` is a temporary reader. But that still wouldn't be a *good* explanation. In essence, you use `stream.cancel()` to cancel a stream if you haven't locked it. If you have, you should use `reader.cancel()` instead, which requires that your `reader` still has the *active* lock on the stream. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/issues/1287#issuecomment-1627368451 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/streams/issues/1287/1627368451@github.com>
Received on Saturday, 8 July 2023 14:51:56 UTC