Re: [fetch] Aborting a fetch (#27)

@jyasskin the refcount would be increased by cancellable promises. So `cancellablePromise.then()` increases the refcount, as would `CancellablePromise.resolve(cancellablePromise)`, `Promise.resolve(cancellablePromise)` would not.

If you use `async`/`await` you're opting into a sync-like flow, so yeah if you want the async stuff you need to use promises, or we decide that cancellation results in a rejection with an abort error.

`onCancel` could be passed `(resolve, reject)` so the promise vendor could decide what the sync equivalent should be.

> I'm also worried about subsequent uses of the original promise hanging instead of rejecting.

Yeah, it should `onCancel`.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/27#issuecomment-86632918

Received on Thursday, 26 March 2015 17:28:08 UTC