PropertiesChanged signal - races...

Thiago Macieira thiago at
Tue May 11 05:37:22 PDT 2010

Em Terça-feira 11. Maio 2010, às 13.01.53, David Zeuthen escreveu:
> Hey,
> On Tue, May 11, 2010 at 5:39 AM, Thiago Macieira <thiago at> wrote:
> > Here's an idea:
> > 
> > org.freedesktop.DBus.Properties:
> > 
> > GetAndSubscribe(in string inteface_name, in string property_name, out
> > variant value, out boolean subscribed)
> (Would probably want a GetAll() to avoid message header overhead)

GetAllAndSubscribe(in string interface_name, out a{s(vb)} result)

> OK, but assuming with had this optimization that the bus would tell
> when AddMatch() is called (for any signal), I think what are you
> proposing isn't functionally different from just this
>  - the proposed PropertiesChanged(a{sv} changed_props) signal


>  - two new annotations
>    - <annotation name="org.freedesktop.DBus.Properties.EmitsChanged"
> value="true"/>
>    - <annotation
> name="org.freedesktop.DBus.Properties.EmitsChangedWithValue"
> value="true"/>
> It strikes me it's actually functionally equivalent, isn't it?

Almost. The difference is that you're storing this information in the 
introspection, which I think is the wrong place to do so:

1) when the introspection is used to generate client/server code, the 
annotations are irrelevant -- the ability to emit or emit with value are 
dependent on the binding of the server, not on the author of the interface

2) for that reason, you cannot rely on a property emitting notification unless 
you communicate with the remote interface. I'd rather get that information in 
a D-Bus proper structure, rather than parsing XML.

> (Except that we won't get any optimization until we add the "tell me
> when people subscribe to a signal" feature to the the message bus.)
> Cheers,
> David
> _______________________________________________
> dbus mailing list
> dbus at

Thiago Macieira - thiago (AT) - thiago (AT)
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the dbus mailing list