Cancelable promises

Kevin Smith zenparsing at
Fri Feb 27 22:25:36 PST 2015

>  AsyncJS ( uses a separate abstraction
> for cancellation based on the .NET
> CancellationTokenSource/CancellationToken types. You can find more
> information about this abstraction in the MSDN documentation here:

That's what I was looking for : )

So the core idea is that the initiator establishes a one-way communication
channel through which it can send control signals to the in-flight task.
The task can choose to respond to those signals in whatever fashion it
likes (or not at all).

That design seems far cleaner than adding functionality directly to
promises, but can it be made JS-ergonomic?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list