roadmap
Scott James Remnant
scott at canonical.com
Thu Aug 7 08:06:54 PDT 2008
On Thu, 2008-08-07 at 07:19 -0500, David Stockwell wrote:
> If I can chime in, I think it is useful to not care whether anyone is
> listening when emitting a signal.
>
> Maybe there is some network and processing overhead in emitting a signal
> that noone cares about, but adding this notification would add
> complexity and overhead.
>
Complexity in the bindings only, an application wouldn't need to care;
it can emit regardless, and the binding may suppress the actual
emission.
The primary overhead is not network or processing, but that the bus
daemon has to wake up for every signal even if nothing matches it. This
vastly increases power consumption, cpu load, etc.
> I can imagine putting in code that bypasses sending a signal when
> "nobody" is listening; but then having to add a callback when someone
> suddenly appears subscribing to a signal. And then there is the
> possibility/probabability of race conditions, not emitting a signal when
> another process was "just about" to request the signal.
>
This is no different to the race condition of adding the match to the
bus just after the signal was emitted.
The standard practice is to add the signal matches, then enumerate the
objects by hand, so that the signals at worse re-iterate what's already
in your enumeration.
Scott
--
Scott James Remnant
scott at canonical.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080807/6353ea0a/attachment.pgp
More information about the dbus
mailing list