last icon indicating copy to clipboard operation
last copied to clipboard

"previously-returned pending promises stay pending forever"

Open tobireif opened this issue 9 years ago • 2 comments

Regarding "previously-returned pending promises stay pending forever" - would it be desirable if they'd be canceled/deleted/nulled instead? (if that's possible)

tobireif avatar Sep 12 '15 12:09 tobireif

I think if we had a notion of cancelation in promises then that would make sense. I'm not sure what deleted or nulled would mean.

domenic avatar Sep 15 '15 01:09 domenic

I do hope that ES6 promises become cancellable. Even for the first simple version we have now, cancellation really is a missing feature.

On http://stackoverflow.com/questions/21781434/status-of-cancellable-promises you wrote: "But that depends on a lot of people doing a lot of work, so we'll see if it happens :)"

I hope it will.

https://github.com/slightlyoff/ServiceWorker/issues/625#issuecomment "I think it would require some concerted all-hands-on-deck API design to come up with the correct semantics for cancelable promises"

Having a token would work for me, I think.

So, ideally, ES6 promises would soon become cancellable, and you could then (if you want) resolve and close this ticket :)

tobireif avatar Sep 15 '15 08:09 tobireif