We debated similar topics when designing C# cancellation. Difficult line to walk between explicit, implicit, and compatibility.
-
-
I like. If you bottom out on a hand-rolled promise, it can presumably just capture await.cancel and wire up a callback on the token.
-
yes, exactly.
-
it could be passed into the promise constructor potentially for the last mile. Tricky to cross the lang/lib divide.
-
I think some people don't like await.cancel being available in all functions (I don't mind).
-
also need to make sure it's possible to convey to combinators like Promise.all. Perhaps enough to immediate invoke async func
-
thing I like about `task`: it creates a notion of task that isn't just some combo of promises.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.