Domenic Denicola (2013-05-01T05:01:38.000Z)
github at esdiscuss.org (2013-07-12T02:27:21.159Z)
I think the .NET disposal analogy is a good one. I don?t know how other runtimes handle it, but in .NET you would dispose of a resource (perhaps representing an in-progress asynchronous operation) by having the handle for that resource implement IDisposable, i.e. have a dispose() method. So I think if you wanted to do something similar with promises, you?d return a disposable handle alongside your promise (i.e. `return { promise, diposable }` or simply `{ promise, dispose }`). You can also layer that on top of the promise (i.e. `promise.dispose = () => { .. }; return promise;`).