tc39 / proposal-cancelable-promises

Former home of the now-withdrawn cancelable promises proposal for JavaScript
Other
376 stars 29 forks source link

Missing cleanup when overwriting `await.cancelToken` #42

Closed bergus closed 8 years ago

bergus commented 8 years ago

If an execution context's CancelToken component already contains a token, the execution context is not purged from the list of that token - like it does happen when you assign undefined - before the new token is assigned. This would lead to very unfavourable behaviour I guess, having multiple tokens race to reject the PromiseToCancel.

domenic commented 8 years ago

Confirmed, good catch.