pendingcalls without timeout

Richard Hult richard at imendio.com
Mon Mar 15 13:11:02 PST 2004


mån 2004-03-15 klockan 21.43 skrev Anders Gustafsson:
> Hi,
> 
> we have a system with a server and clients, that connect using a dbus
> (an own bus). The client issues commands like "start doing stuff",
> "stop doing stuff", "get list of stuff that you are prepared to do",
> "get current status". All those give a immediate response, and are
> implemented as dbus-methodcalls and the client uses pendingcalls. This
> works very well, and we have some really nice functions that converts
> between our internal (in the server) object model and dbus-messages.
> 
> However there is also some calls "wait until status changes and report
> it". However, pending calls have a timeout, and that call might take
> some time to return (in the range milliseconds to days). I see no
> reason why pending calls MUST have a timeout. Could someone please
> care to explain?
>
> Someone will probably argue that this should be solved using signals
> emitted by the server, but it would be to wasteful to broadcast those
> signals to all clients. So some signal-subscription would be
> needed. That would just duplicate code that would come from free with
> pendingcalls without timeout. It would also require more code
> duplication in the serverside.

Signals are only sent to clients with a match rule that matches the
signal. That should work pretty well in your case, I think.

/Richard

-- 
Richard Hult                    richard at imendio.com
Imendio                         http://www.imendio.com




More information about the dbus mailing list