Re:Promises are not neutral enough
by codedokode on Thursday February 15, 2018 @01:48PM
(#16386454)
Actually, cancellations can be useful to prevent wasting resources on useless computations. Imagine, if you have 2 threads doing some computations that will be later merged. If one thread fails, it makes no sense to continue executing other thread. That is where cancellation can help - but it should be thoroughly designed, not hacked like they usually do it in Node.JS.
[ Parent
| on HN ]
Re:Promises are not neutral enough
by magnushiie on Thursday February 15, 2018 @03:31PM
(#16387329)
I was not saying cancellations are not useful, I was saying cancellations are better handled explicitly via cancellation tokens (which compose perfectly, unlike computation based cancellation).