Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for CancelToken? #365

Closed
jasonkuhrt opened this issue Dec 13, 2016 · 5 comments
Closed

Add support for CancelToken? #365

jasonkuhrt opened this issue Dec 13, 2016 · 5 comments

Comments

@jasonkuhrt
Copy link

Hey,

Its probably too early to begin this in earnest but assuming most wants to play well in the spec-compliant world then would it make sense to add support for CancelTokens (detail) in any special way?

While cancelToken.promise is sufficient to feed combinators like until I wonder if anything special needs to be done on the error handling side to distinguish between a canceled stream versus a failed one.

@TylorS
Copy link
Collaborator

TylorS commented Dec 13, 2016

I can't speak for the other contributors, but I can say I'm not too interested in becoming spec-compliant. If we were to become spec-compliant, we would almost certainly see a performance drop.

@ospatil
Copy link

ospatil commented Dec 17, 2016

The cancelToken proposal has been withdrawn. More here - tc39/proposal-cancelable-promises#70.

@briancavalier
Copy link
Member

Thanks @ospatil.

@jasonkuhrt I believe I can safely say that the consensus of the core most.js team has been that we wouldn't support CancelToken until it had become clear that it would survive and become official. Now that the proposal has been withdrawn, it doesn't make sense to support it in the core lib.

If someone needs support for it for some reason (CancelToken early adopters??), they can implement an external subscribe-like helper that deals with CTs.

@jasonkuhrt
Copy link
Author

I discovered cancel tokens a mere few weeks ago, and now their out–ha. Sorry for the noise everyone.

@briancavalier
Copy link
Member

No worries, @jasonkuhrt. Yeah, I think the withdraw was surprising to most folks. I haven't seen a good explanation for the reasons other than "google objected". I wasn't personally a fan of the proposal, but it'd be nice to know the reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants