Re: [ServiceWorker] Returning a FetchPromise from fetch() (#625)

> This is the biggest issue with cancellable promises, IMO. Our current take is to make then fail when called twice on a single cancellable promise. That way you can use it like a normal promise in most cases (including await), but you cannot extract its value twice.

Uuuuuuggggghhhh, that's not a Promise anymore, then.  Please don't screw with the interface like this; it'll break things in confusing ways, especially as more tooling shows up around Promises.

If you want .then() to only be callable once, you don't have a Promise. You have a Task.  If that's what we want, great, but then let's make it *much clearer* that this isn't a promise; call the chaining method `.pipe()`, etc.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/625#issuecomment-75342135

Received on Saturday, 21 February 2015 00:04:29 UTC