Future cancellation

Tab Atkins Jr. jackalmage at gmail.com
Wed May 1 13:37:31 PDT 2013


On Wed, May 1, 2013 at 1:29 PM, Bill Frantz <frantz at pwpconsult.com> wrote:
> On 5/1/13 at 11:13 AM, jackalmage at gmail.com (Tab Atkins Jr.) wrote:
>> I think you're making this far too complicated.  It's much simpler than
>> this:
>>
>> 1. XHR is a very reasonable API to Future-ize.
>> 2. XHRs are cancellable.
>> 3. Ergo, we should have a cancellable Future subtype.
>
> Why make it more complex than necessary. While a XHR implementation may wish
> to add a cancel operation, JS is a broader language than just the web. There
> are use cases that don't need cancel and they should not have to pay the
> costs of the additional communication paths that cancel will require.
>
> With a simple promise, others can build objects which use the promise as an
> internal component and provide cancel or other useful operations. Leaving
> the implementations of these other operations to libraries will allow
> experimentation to proceed standardization.

Ah, I'm not proposing that we augment the base Future class with
cancellation properties.  I explicitly used the term "subtype" in the
quoted bit above.  *Some* of Ron's suggestions were to augment the
base Future class, but not all of them, and several other people
pushed back on that.

~TJ


More information about the es-discuss mailing list