- From: Benjamin Gruenbaum <notifications@github.com>
- Date: Sat, 30 Jan 2016 10:26:57 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
Received on Saturday, 30 January 2016 18:27:27 UTC
@jan-ivar > @benjamingr My library has no inherent interest in absorbing responsibility over whether what came before should be cancellable or not I think I might have miscommunicated. Your example absolutely does not leak a reference with refcount semantics. My note was with regards to unhandled exception tracking and its relation with cancellation. See https://jsfiddle.net/v6LrLdsj/ ```js var p = cancellablePromiseFactory(); p.catch(() => {}); p.cancel(); // p gets cancelled here ``` On the other hand: ```js var p = cancellablePromiseFactory(); var p2 = p.then(...); var p3 = p.then(...); p2.cancel(); // refcounting semantics means it's unsound to abort here ``` Example: https://jsfiddle.net/1vfq7oq1/ I assumed you tried these semantics out first before you engaged in this debate. Feel free to use the fiddle links as a playground for testing out bluebird's cancellation. --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/27#issuecomment-177268002
Received on Saturday, 30 January 2016 18:27:27 UTC