dbus2 / zbus-old

Rust D-Bus crate.
https://gitlab.freedesktop.org/dbus/zbus
Other
49 stars 13 forks source link

Consolidate signal subscription mechanism #140

Closed zeenix closed 1 year ago

zeenix commented 3 years ago

At the moment, proxies directly subscribe to (i-e add a match rule to the bus) signals, which means if someone has two instances of the same proxy and unsubscribe from one of them, we end up unsubscribing the other other one too.

I think this should be handled the same way as done in GDBus: the subscription is handled by Connection types for the proxies and it ensures that only one subscriptions for the same interface, service and path can be registered. It also must ensure that unsubscription only happens when all subscribers have unsubscribe (i-e keep a count of subsciptions).

zeenix commented 3 years ago

mentioned in commit cea1f151e54559e313dcbda4244f87b6d2dd4000

zeenix commented 3 years ago

mentioned in commit 6aff6c3d6a39fd8ffffe2534774dd30bc7fa9928