signals, signalTracker: Add Signals.DestroyableEventEmitter
Another prerequisite of !2330, that shares some commits with !2541 (but keeping them separated for reviewing reasons).
The main point here was to be able to expose a pure-js object of type Signals.EventEmitter
as a destroyable-type to be used in signalTracker, currently introduced as Signals.DestroyableEventEmitter
(naming can be improved). This allows to basically have auto-disconnection when a such object emits a destroy
signal as we do from some GObject's.
Now, In order to implement this properly sadly we need more stuff than expected:
- We must have
connect_after
on signal-emitter.- In any case we should decide what to do with it, because without
AFTER
support, it would be quite unsafe to use.
- In any case we should decide what to do with it, because without
- Some circular dependencies make things a bit harder than it should be, so for example the pure JS implementation of
TransientSignalHolder
should probably just be moved tosignals
module to make it cleaner.
Edited by Marco Trevisan