AddMatchWithID / RemoveMatchById
Ryan Lortie
desrt at desrt.ca
Tue Feb 19 19:32:28 PST 2008
On Wed, 2008-02-20 at 14:21 +1100, Curtis Maloney wrote:
> Ryan Lortie wrote:
> >
> > g_bus_match ("[rule for /apps/foo/]", my_callback, user_data);
> >
> > g_bus_match ("[rule for /apps/bar/]", other_callback, user_data);
> >
> I know in my usage, I want EVERYONE who's registered an interest in the signal
> to get notified.
>
> Why would you only deliver it to one, when both have legitimately registered an
> interest?
The first caller is not interested in matches for /apps/bar/. Only
those for /apps/foo/.
If we deliver all incoming signals to everyone who has expressed
interest in anything then that means that the behaviour of the first
caller will be changed as a side-effect of the second caller adding its
match (it will begin receiving extra unexpected messages). This can't
be considered to be a good thing.
Cheers
More information about the dbus
mailing list