Re: [streams] Getting errored/closed reader, Auto-releasing reader, Forcible cancel() on a stream (#297)

I think I was originally thinking of [Plan B] but while writing the end of my last comment I realized it was kind of dumb. So if promise cancellation is accomplished via `p.cancel()` then I think [Plan A] is better.

But if we do promise cancellation via a cancellation token ("canceller") approach then I think we could allow [Plan D] `canceller.cancel()` to cancel either the promise, headers are not yet received, or error the stream, after headers are received. I think this is probably able to be modeled, although we haven't worked out the details of how canceller works. But, maybe that is needless complication and we would do [Plan C] `canceller.cancel()` only works before the headers are received, and you need to do `req.cancel()` or similar (`req.error()`? `req.abort()`?).

(Plan A <-> Plan C, Plan B <-> Plan D, is the mapping.)

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/297#issuecomment-81420339

Received on Monday, 16 March 2015 05:13:17 UTC