tc39 / proposal-cancelable-promises

Former home of the now-withdrawn cancelable promises proposal for JavaScript
Other
375 stars 29 forks source link

Why do we need `throw.cancel`? #13

Closed benjamingr closed 8 years ago

benjamingr commented 8 years ago

Hey, it looks like there are some discussions offline or that are not documented here. It's not immediately obvious why throw.cancel or a similar construct is even required.

I don't understand why an async method should be able to signal a throw.cancel (canceling itself?) - cancellation is inherently from the outside - especially with disinterest semantics, otherwise it's just abort semantics and we can use exceptions for the whole thing.

I'm sure I'm missing something fundamental here.

NekR commented 8 years ago

See issue #10 (closed now) On May 27, 2016 01:07, "Benjamin Gruenbaum" notifications@github.com wrote:

Hey, it looks like there are some discussions offline or that are not documented here. It's not immediately obvious why throw.cancel or a similar construct is even required.

I don't understand why an async method should be able to signal a throw.cancel (canceling itself?) - cancellation is inherently from the outside - especially with disinterest semantics, otherwise it's just abort semantics and we can use exceptions for the whole thing.

I'm sure I'm missing something fundamental here.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/domenic/cancelable-promise/issues/13

benjamingr commented 8 years ago

Thanks, I missed that!