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

> The external one is implicitly created by the JS engine at the time the async function starts, and is returned back completely unawares to the code inside the async function.

If we have cancel-able Promises in place for ES7, the external one you mention will be implicitly created by the JS engines **as cancelable** so that whatever is on hold internally through `await` will receive, implicitly, the `.cancel(value)` invoke whenever it happens **explicitly** outside the `async` function.

I really don't have any better way to explain this, but you should really try to open your minc 'cause of course this pattern is not possible yet, which is why we are here: to improve, not to re-iterate the already uncancel-able idea behind.

Accordingly ....

> There is no such thing. You don't call foo.cancel(..), you call foo() ... .cancel(), which means you're calling cancel(..) or next(..) or whatever on what that return value is. As design stands, that value is a promise.

There **could be such a thing** if we move on, so that you can have cancel-able Promises and everything I've already coded already works and makes sense.


> If you'd like to explore async functions more, let's go elsewhere.
I've never even brought them up so you should really probably discuss them somewhere else, if you are still confused by my Cancelable Promise solution that integrates with something not even standard yet: asunc and await. Are you willing to not talk about async and await as if these were long stanting standard patterns? 'cause no spec is defined yet for them, regardless written books or blogposts.

We **must** be able to fix things before these are out, not be stuck with documentation about partially defined standards. Agreed? I hope so ...



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

Received on Monday, 30 March 2015 22:35:27 UTC