Open
Description
It would be useful for the Observable
class to support the upcoming Symbol.dispose
or Symbol.asyncDispose
mechanism (TC39 Explicit Resource Management proposal) such that when the Observable
is disposed while still active, any outstanding subscriptions and closed and outstanding promises are rejected.
using obs1 = eventTarget.on('foo');
using obs2 = Observable.from(asyncIterable);
This is particularly helpful in cases where a block of code may wish to only temporarily attach itself to a particular event source (like an EventTarget
that long outlives the Observable
)