3 ms·
There is a cancellation library kicking around npm that reasonably mimics C#'s. There must have been man-years of discussion on the Bluebird project around can
by Rapzid 9y ago
There is a cancellation library kicking around npm that reasonably mimics C#'s.
There must have been man-years of discussion on the Bluebird project around cancellation, but for me it all comes back to tokens as every promise baked-in solution feels a bit off. Golang effectively has them as well via the context package.
*As you say it is pretty easy to do, but it's nice to standardize on an implementation
- inglor 9y agoYes, we've been reading all the golang discussion very carefully. It's nice to see them go through the same mental process we went through - and my hopes are that if we don't interfere they'll come up with a better idea we can just copy. We've had 4 cancellation proposals rejected so far (cancellation as rejection, third state, cancellable-promise and cancel-tokens). They work in bluebird pretty well - but people have concerns. Personally I use our cancellation if I already have bluebird, and tokens if I don't.